Skip to main content

ILampInfo::GetNearestSupportedColor

Finds the nearest/closest matching color supported by this Lamp relative to the desired color.

Syntax

Parameters

desiredColor
Type: LampArrayColor
The color to approximate.

Return value

Type: LampArrayColor The nearest/closest color supported by this Lamp.

Remarks

Not every Lamp on a LampArray is guaranteed to support true 24-bit RGB color (support is dependent on device capabilities). Based on the available color levels for the Lamp (including red, blue, green and gain), the nearest color supported by the Lamp is determined, assuming that each channel is linearly scaled over the available levels.

Requirements

Header: LampArray.h Library: xgameplatform.lib Supported platforms: XBOX One family consoles and XBOX Series consoles

See also

Lighting API Overview
ILampInfo ILampInfo::GetRedLevelCount
ILampInfo::GetBlueLevelCount
ILampInfo::GetGreenLevelCount
ILampInfo::GetGainLevelCount
Last modified on August 20, 2026