LampArray.SetColorsForKeys(Color[], VirtualKey[]) 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.
public:
virtual void SetColorsForKeys(Platform::Array <Color> ^ desiredColors, Platform::Array <VirtualKey> ^ keys) = SetColorsForKeys;
void SetColorsForKeys(winrt::array_view <Color> const& desiredColors, winrt::array_view <VirtualKey> const& keys);
public void SetColorsForKeys(Color[] desiredColors, VirtualKey[] keys);
function setColorsForKeys(desiredColors, keys)
Public Sub SetColorsForKeys (desiredColors As Color(), keys As VirtualKey())
Parameters
- desiredColors
- Color[]
Array of desired colors.
- keys
- VirtualKey[]
Array of corresponding VirtualKeys 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
If the lamp index doesn't support the desired color, it is set to the NearestSupportedColor
If a VirtualKey is not bound to any lamp on the device, it is ignored and the remaining are still applied.
Black is equivalent to a lamp being 'off'.