picofuse

Macros | Typedefs | Functions
color.h File Reference

RGBA color type and helpers. More...

#include <stdint.h>
Include dependency graph for color.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PIX_COLOR_RED   0xFF0000FFu
 
#define PIX_COLOR_GREEN   0x00FF00FFu
 
#define PIX_COLOR_BLUE   0x0000FFFFu
 
#define PIX_COLOR_WHITE   0xFFFFFFFFu
 
#define PIX_COLOR_BLACK   0x000000FFu
 Common opaque colors (0xRRGGBBAA).
 
#define PIX_COLOR_RGBA(r, g, b, a)
 Construct a pix_color_t from separate R/G/B/A components. More...
 
#define PIX_COLOR_RGB(r, g, b)   PIX_COLOR_RGBA(r, g, b, 0xFFu)
 Construct a fully-opaque pix_color_t from R/G/B components.
 

Typedefs

typedef uint32_t pix_color_t
 Color value type for pixel operations. More...
 

Functions

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.
 
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.
 

Detailed Description

RGBA color type and helpers.

Definition in file color.h.