Skip to content

cf_pixel_to_int_rgb

Category: graphics
GitHub: cute_color.h


Converts a CF_Pixel to an integer in 0x00RRGGBB format.

uint32_t cf_pixel_to_int_rgb(CF_Pixel p) { return ((uint32_t)p.colors.r << 16) | ((uint32_t)p.colors.g << 8) | p.colors.b; }
Parameters Description
p The pixel.

Return Value

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

cf_pixel_to_color
cf_pixel_to_int_rgba
cf_pixel_to_string