]> git.lizzy.rs Git - nothing.git/blob - src/color.h
Merge pull request #107 from tsoding/102
[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 // TODO(#108): color constructor can be easily shadowed in many situation
11 color_t color(float r, float g, float b, float a);
12 color_t color256(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
13 color_t color_from_hexstr(const char *hexstr);
14 SDL_Color color_for_sdl(color_t color);
15
16 color_t color_desaturate(color_t color);
17
18 #endif  // COLOR_H_