# Convert Real Color Component to Integer 255 Color Component

Grammar — Convert real color colorComponent to color 0…255
FlagsNative | 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);

Category: Conversion / Color Conversions

# Examples

# mods/core.sc2mod

NativeLib.galaxy

// L2243
Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentRed))
// L2243
Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentGreen))
// L2243
Color255FromFixed(ColorGetComponent(lp_color, c_colorComponentBlue))
// L1927
Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelRed))
// L1927
Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelGreen))
// L1927
Color255FromFixed(ColorGetChannel(lp_color, c_colorChannelBlue))