# 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
- Convert Reals To Color —
color
— Color - Convert Reals To Color With Alpha —
color
— ColorWithAlpha - Color Component —
fixed
— ColorGetComponent - Convert Real Color Component to Integer 255 Color Component —
int
— Color255FromFixed - Convert Color Index To Color —
color
— ColorFromIndex - Convert Player Color To Color —
color
— libNtve_gf_ConvertPlayerColorToColor
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:2237
// Automatic Variable Declarations
// Implementation
return ColorFromIndex((lp_playerColor), c_teamColorDiffuse);
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1921
// Automatic Variable Declarations
// Implementation
return ColorFromIndex((lp_playerColor));
}