]> git.lizzy.rs Git - nothing.git/blob - src/color.h
b740e652bc3211b4fa2c343101c60feab290d10f
[nothing.git] / src / color.h
1 #ifndef COLOR_H_
2 #define COLOR_H_
3
4 #include <stdio.h>
5 #include <SDL.h>
6
7 typedef struct Color {
8     float r, g, b, a;
9 } Color;
10
11 Color rgba(float r, float g, float b, float a);
12 Color hexstr(const char *hexstr);
13 SDL_Color color_for_sdl(Color color);
14
15 int color_hex_to_stream(Color color, FILE *stream);
16
17 Color color_darker(Color color, float d);
18
19 Color color_desaturate(Color color);
20
21 Color color_invert(Color c);
22
23 Color color_scale(Color c, Color fc);
24
25 #endif  // COLOR_H_