cf_make_color_hex¶
Category: graphics
GitHub: cute_color.h
Returns a CF_Color made from integer hex input.
CF_Color cf_make_color_hex(int hex) { return cf_make_color_rgba((uint8_t)((hex & 0xFF0000) >> 16), (uint8_t)((hex & 0x00FF00) >> 8), (uint8_t)(hex & 0x0000FF), 0xFF); }
| Parameters | Description |
|---|---|
hex |
An integer value, e.g. 0xFFAACC. |
Remarks¶
The opacity of the output color is set to 0xFF (fully opaque).
Related Pages¶
CF_Color
cf_make_color_rgb_f
cf_make_color_rgba_f
cf_make_color_rgb
cf_make_color_rgba
cf_make_color_hex_string