Skip to content

cf_make_pixel_hex2

Category: graphics
GitHub: cute_color.h


Returns a CF_Pixel made from integer hex input.

CF_Pixel cf_make_pixel_hex2(int hex, int alpha) { return cf_make_pixel_rgba((uint8_t)((hex & 0xFF0000) >> 16), (uint8_t)((hex & 0x00FF00) >> 8), (uint8_t)(hex & 0x0000FF), (uint8_t)(alpha & 0xFF)); }
Parameters Description
hex An integer value, e.g. 0xFFAACC, and alpha e.g. 0xFF.

CF_Pixel
cf_make_pixel_rgb_f
cf_make_pixel_rgba_f
cf_make_pixel_rgb
cf_make_pixel_rgba
cf_make_pixel_hex
cf_make_pixel_hex_string