Jaa


LampArray.SetColorsForIndices(Color[], Int32[]) Method

Definition

Sets the color for multiple lamps. Position within each array maps lamp index to desired color.

public:
 virtual void SetColorsForIndices(Platform::Array <Color> ^ desiredColors, Platform::Array <int> ^ lampIndexes) = SetColorsForIndices;
void SetColorsForIndices(winrt::array_view <Color> const& desiredColors, winrt::array_view <int> const& lampIndexes);
public void SetColorsForIndices(Color[] desiredColors, int[] lampIndexes);
function setColorsForIndices(desiredColors, lampIndexes)
Public Sub SetColorsForIndices (desiredColors As Color(), lampIndexes As Integer())

Parameters

desiredColors
Color[]

Array of desired colors.

lampIndexes

Int32[]

int[]

Array of corresponding lamp indexes to modify.

Examples

LampArray sample

Demonstrates how to control RGB lighting of peripheral devices using the Windows.Devices.Lights and Windows.Devices.Lights.Effects APIs.

AutoRGB Sample

Demonstrates how to extract a single, representative color from a desktop screen and use it to illuminate LED lamps on a connected RGB device.

Remarks

Size of desiredColors and lampIndexes arrays must be identical or call will fail.

If the lamp doesn't support the desired color, it is set to the NearestSupportedColor

If an index does not exist on the device, it is ignored and the remaining are still applied.

Black is equivalent to a lamp being 'off'.

Applies to

See also