]> git.lizzy.rs Git - nothing.git/blob - src/color.h
f3a0e120d0b116376c9dee5483c3945867ff9e81
[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 rgba(float r, float g, float b, float a);
11 // TODO: color_from_hexstr -> hexstr
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_