# 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.sc2modbase.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.sc2modbase.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.sc2modbase.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.stormmodbase.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.stormmodbase.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.stormmodbase.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))));
}