Skip to content

cf_color_to_int_rgba

Category: graphics
GitHub: cute_color.h


Converts a CF_Color to an integer in 0xRRGGBBAA format.

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

Return Value

Returns an unsigned 32-bit integer in 0xRRGGBBAA format.

cf_color_to_pixel
cf_color_to_int_rgb
cf_color_to_string