LampArray.SetColorsForKey(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 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.
- key
- VirtualKey
The VirtualKey.
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 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'.