> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ILampInfo::GetNearestSupportedColor method

> Returns the closest color a Lamp on a LampArray can physically render for a requested LampArrayColor, accounting for its per-channel level counts.

# ILampInfo::GetNearestSupportedColor

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

## Syntax

```cpp theme={null}
LampArrayColor GetNearestSupportedColor(
    LampArrayColor desiredColor)
```

### Parameters

*desiredColor*\
Type: [LampArrayColor](/reference/lighting/lamparray/structs/lamparraycolor)

The color to approximate.

### Return value

Type: [LampArrayColor](/reference/lighting/lamparray/structs/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](/build/core-features/common/lighting/gc-lighting-toc)\
[ILampInfo](/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo)
[ILampInfo::GetRedLevelCount](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getredlevelcount)\
[ILampInfo::GetBlueLevelCount](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getbluelevelcount)\
[ILampInfo::GetGreenLevelCount](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getgreenlevelcount)\
[ILampInfo::GetGainLevelCount](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getgainlevelcount)


## Related topics

- [ILampInfo::GetFixedColor method](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getfixedcolor.md)
- [ILampInfo::GetBlueLevelCount method](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getbluelevelcount.md)
- [ILampInfo::GetGreenLevelCount method](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getgreenlevelcount.md)
- [ILampInfo::GetRedLevelCount method](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getredlevelcount.md)
- [ILampInfo::GetGainLevelCount method](/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getgainlevelcount.md)
