# Convert Real Color Component to Integer 255 Color Component
Grammar — Convert real color colorComponent to color 0…255
Flags —Native
|Function
|Internal
Used to generate actor messages, which take colors in the range 0 to 255.
# Arguments
fixed
— Color Component
Returns — int
native int Color255FromFixed(fixed f);
# 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:2243
// Automatic Variable Declarations
// Implementation
return (IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentRed))) + "," + IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentGreen))) + "," + IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentBlue))));
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:2243
// Automatic Variable Declarations
// Implementation
return (IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentRed))) + "," + IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentGreen))) + "," + IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentBlue))));
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:2243
// Automatic Variable Declarations
// Implementation
return (IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentRed))) + "," + IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentGreen))) + "," + IntToString(Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentBlue))));
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1927
// Automatic Variable Declarations
// Implementation
return (IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelRed))) + "," + IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelGreen))) + "," + IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelBlue))));
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1927
// Automatic Variable Declarations
// Implementation
return (IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelRed))) + "," + IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelGreen))) + "," + IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelBlue))));
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1927
// Automatic Variable Declarations
// Implementation
return (IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelRed))) + "," + IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelGreen))) + "," + IntToString(Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelBlue))));
}