LampArray.SetColorsForKey(Color, VirtualKey) Method

Definition

Sets the color for all lamps that map to the key. Multiple lamps can map to the same key.

public:
 virtual void SetColorsForKey(Color desiredColor, VirtualKey key) = SetColorsForKey;
void SetColorsForKey(Color const& desiredColor, VirtualKey const& key);
public void SetColorsForKey(Color desiredColor, VirtualKey key);
function setColorsForKey(desiredColor, key)
Public Sub SetColorsForKey (desiredColor As Color, key As VirtualKey)

Parameters

desiredColor
Color

The desired color.

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

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

If the key is not bound to any lamp, the call fails silently.

Black is equivalent to a lamp being 'off'.

Applies to

See also