X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fcolor.h;h=d169df2cf5bfe84a591e5cceaafd45e5943268f3;hb=6679a839e4ce3d4c5e027dfe2ccd83e2d12ba1c1;hp=fa13eaa765261f0bbc0a8dee18aac6e228d067dd;hpb=8246bb5efe4e89dbe59d3a553c9684ca24defdf7;p=nothing.git diff --git a/src/color.h b/src/color.h index fa13eaa7..d169df2c 100644 --- a/src/color.h +++ b/src/color.h @@ -1,16 +1,20 @@ #ifndef COLOR_H_ #define COLOR_H_ -typedef struct SDL_Color SDL_Color; +#include -typedef struct color_t { +typedef struct Color { float r, g, b, a; -} color_t; +} Color; -color_t color(float r, float g, float b, float a); -color_t color256(Uint8 r, Uint8 g, Uint8 b, Uint8 a); -SDL_Color color_for_sdl(color_t color); +Color rgba(float r, float g, float b, float a); +Color hexstr(const char *hexstr); +SDL_Color color_for_sdl(Color color); -color_t color_desaturate(color_t color); +Color color_darker(Color color, float d); + +Color color_desaturate(Color color); + +Color color_invert(Color c); #endif // COLOR_H_