Skip to content

cf_color_to_int_rgb

Category: graphics
GitHub: cute_color.h


Converts a CF_Color to an integer in 0x00RRGGBB format.

uint32_t cf_color_to_int_rgb(CF_Color c) { CF_Pixel p = cf_color_to_pixel(c); return ((uint32_t)p.colors.r << 16) | ((uint32_t)p.colors.g << 8) | p.colors.b; }
Parameters Description
c The color.

Return Value

Returns an unsigned 32-bit integer in 0x00RRGGBB format. The alpha component is discarded.

cf_color_to_pixel
cf_color_to_string
cf_color_to_int_rgba