]> git.lizzy.rs Git - nothing.git/blob - src/color.h
find -type f -exec sed -i "s/\b\(\w\)\(\w*\)_t\b/\U\1\E\2/g" {} \;
[nothing.git] / src / color.h
1 #ifndef COLOR_H_
2 #define COLOR_H_
3
4 #include <SDL2/SDL.h>
5
6 typedef struct Color {
7     float r, g, b, a;
8 } Color;
9
10 Color color(float r, float g, float b, float a);
11 Color color256(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
12 Color color_from_hexstr(const char *hexstr);
13 SDL_Color color_for_sdl(Color color);
14
15 Color color_darker(Color color, float d);
16
17 Color color_desaturate(Color color);
18
19 #endif  // COLOR_H_