cf_make_pixel_hex¶
Category: graphics
GitHub: cute_color.h
Returns a CF_Pixel made from integer hex input.
CF_Pixel cf_make_pixel_hex(int hex) { return cf_make_pixel_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 pixel is set to 0xFF (fully opaque).
Related Pages¶
CF_Pixel
cf_make_pixel_rgb_f
cf_make_pixel_rgba_f
cf_make_pixel_rgb
cf_make_pixel_rgba
cf_make_pixel_hex_string
cf_make_pixel_hex2