Skip to content

cf_make_color_rgb

Category: graphics
GitHub: cute_color.h


Returns a CF_Color made from RGB char inputs.

CF_Color cf_make_color_rgb(uint8_t r, uint8_t g, uint8_t b) { CF_Color color; color.r = (float)r / 255.0f; color.g = (float)g / 255.0f; color.b = (float)b / 255.0f; color.a = 1.0f; return color; }
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 1.0f;

CF_Color
cf_make_color_rgb_f
cf_make_color_rgba_f
cf_make_color_hex_string
cf_make_color_rgba
cf_make_color_hex