28 #define PIX_COLOR_RED 0xFF0000FFu 29 #define PIX_COLOR_GREEN 0x00FF00FFu 30 #define PIX_COLOR_BLUE 0x0000FFFFu 31 #define PIX_COLOR_WHITE 0xFFFFFFFFu 32 #define PIX_COLOR_BLACK 0x000000FFu 38 #define PIX_COLOR_RGBA(r, g, b, a) \ 39 ((pix_color_t)(((uint32_t)(uint8_t)(r) << 24) | \ 40 ((uint32_t)(uint8_t)(g) << 16) | \ 41 ((uint32_t)(uint8_t)(b) << 8) | \ 42 (uint32_t)(uint8_t)(a))) 48 #define PIX_COLOR_RGB(r, g, b) PIX_COLOR_RGBA(r, g, b, 0xFFu) 55 return (uint8_t)(color >> 24);
63 return (uint8_t)(color >> 16);
71 return (uint8_t)(color >> 8);
79 return (uint8_t)color;
static uint8_t pix_color_b(pix_color_t color)
Extract the blue channel.
static uint8_t pix_color_a(pix_color_t color)
Extract the alpha channel.
uint32_t pix_color_t
Color value type for pixel operations.
static uint8_t pix_color_r(pix_color_t color)
Extract the red channel.
static uint8_t pix_color_g(pix_color_t color)
Extract the green channel.