# Convert Color Index To Color
Grammar — type color at index index
Flags —Native
|Function
Returns the color at the specified color index. The color index is an index into the array of colors that appear when you select a color in a SC2 game lobby.
# Arguments
int
— Indexint
[ preset::TeamColorType ] — Type
Returns — color
native color ColorFromIndex(int inIndex, int inType);
# Related
Category: Conversion / Color Conversions
- [F] —
color
— Convert Reals To Color — ( Color ) - [F] —
color
— Convert Reals To Color With Alpha — ( ColorWithAlpha ) - [F] —
fixed
— Color Component — ( ColorGetComponent ) - [F] —
int
— Convert Real Color Component to Integer 255 Color Component — ( Color255FromFixed ) - [F] —
color
— Convert Color Index To Color — ( ColorFromIndex ) - [F] —
color
— Convert Player Color To Color — ( libNtve_gf_ConvertPlayerColorToColor )
# Examples
# mods/core.sc2mod
// L2237
ColorFromIndex((lp_playerColor), c_teamColorDiffuse)
// L1921
ColorFromIndex((lp_playerColor))