Skip to content

cf_make_pixel_rgb

Category: graphics
GitHub: cute_color.h


Returns a CF_Pixel made from RGB char inputs.

CF_Pixel cf_make_pixel_rgb(uint8_t r, uint8_t g, uint8_t b) { CF_Pixel p; p.colors.r = r; p.colors.g = g; p.colors.b = b; p.colors.a = 255; return p; }
Parameters Description
r The red component from 0 to 255.
g The green component from 0 to 255.
b The blue component from 0 to 255.

Remarks

The alpha component is set to 255.

CF_Pixel
cf_make_pixel_rgb_f
cf_make_pixel_rgba_f
cf_make_pixel_hex_string
cf_make_pixel_rgba
cf_make_pixel_hex