LampInfo.GetNearestSupportedColor(Color) 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.
Finds the nearest/closest matching color to the desired color, supported by this lamp. Call this to know whether a specific color will be applied during (e.g.) LampArray.SetColor
public:
virtual Color GetNearestSupportedColor(Color desiredColor) = GetNearestSupportedColor;
Color GetNearestSupportedColor(Color const& desiredColor);
public Color GetNearestSupportedColor(Color desiredColor);
function getNearestSupportedColor(desiredColor)
Public Function GetNearestSupportedColor (desiredColor As Color) As Color
Parameters
- desiredColor
- Color
The color to find the nearest/closest.
Returns
The nearest/closest color supported by this lamp.
Remarks
Not every lamp on a LampArray is guaranteed to support true 24-bit RGB color (is dependent on device capabilities). Based on the available color levels the nearest color is determined, assuming that each channel is linearly scaled over the available levels.