2021-09-15 23:24:19 +00:00
|
|
|
#ifndef COLOR_H
|
|
|
|
#define COLOR_H
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2024-08-12 07:07:48 +00:00
|
|
|
typedef struct Color_RGB8 {
|
2020-06-17 19:44:22 +00:00
|
|
|
u8 r, g, b;
|
2020-03-17 04:31:30 +00:00
|
|
|
} Color_RGB8;
|
|
|
|
|
2024-08-12 07:07:48 +00:00
|
|
|
typedef struct Color_RGBA8 {
|
2020-09-30 00:18:46 +00:00
|
|
|
u8 r, g, b, a;
|
|
|
|
} Color_RGBA8;
|
|
|
|
|
|
|
|
// only use when necessary for alignment purposes
|
2024-06-25 19:13:31 +00:00
|
|
|
typedef union Color_RGBA8_u32 {
|
2020-04-16 21:36:12 +00:00
|
|
|
struct {
|
|
|
|
u8 r, g, b, a;
|
|
|
|
};
|
|
|
|
u32 rgba;
|
2020-09-30 00:18:46 +00:00
|
|
|
} Color_RGBA8_u32;
|
2020-05-18 18:24:00 +00:00
|
|
|
|
2024-08-12 07:07:48 +00:00
|
|
|
typedef struct Color_RGBAf {
|
2020-03-17 04:31:30 +00:00
|
|
|
f32 r, g, b, a;
|
|
|
|
} Color_RGBAf;
|
|
|
|
|
2024-08-12 07:07:48 +00:00
|
|
|
typedef union Color_RGBA16 {
|
2021-03-20 19:10:10 +00:00
|
|
|
struct {
|
|
|
|
u16 r : 5;
|
|
|
|
u16 g : 5;
|
|
|
|
u16 b : 5;
|
|
|
|
u16 a : 1;
|
|
|
|
};
|
|
|
|
u16 rgba;
|
2021-08-01 17:15:21 +00:00
|
|
|
} Color_RGBA16;
|
2021-03-20 19:10:10 +00:00
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
#endif
|