]> git.lizzy.rs Git - nothing.git/blob - src/color.h
c2157bbfdad31a0741bf0567b8567b361623377d
[nothing.git] / src / color.h
1 #ifndef COLOR_H_
2 #define COLOR_H_
3
4 typedef struct SDL_Color SDL_Color;
5
6 typedef struct color_t {
7     float r, g, b, a;
8 } color_t;
9
10 color_t color(float r, float g, float b, float a);
11 color_t color256(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
12 color_t color_from_hexstr(const char *hexstr);
13 SDL_Color color_for_sdl(color_t color);
14
15 color_t color_desaturate(color_t color);
16
17 #endif  // COLOR_H_