LampArray.SetColorsForIndices(Color[], Int32[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Demonstrates how to control RGB lighting of peripheral devices using the Windows.Devices.Lights and Windows.Devices.Lights.Effects APIs.
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'.