2018-01-27 11:12:32 -08:00
|
|
|
#ifndef COLOR_H_
|
|
|
|
#define COLOR_H_
|
|
|
|
|
2018-04-14 13:39:11 -07:00
|
|
|
#include <SDL2/SDL.h>
|
2018-01-27 11:12:32 -08:00
|
|
|
|
2018-08-18 10:03:01 -07:00
|
|
|
typedef struct Color {
|
2018-01-27 11:12:32 -08:00
|
|
|
float r, g, b, a;
|
2018-08-18 10:03:01 -07:00
|
|
|
} Color;
|
2018-01-27 11:12:32 -08:00
|
|
|
|
2018-11-12 04:08:57 -08:00
|
|
|
Color rgba(float r, float g, float b, float a);
|
2018-11-12 04:12:17 -08:00
|
|
|
Color hexstr(const char *hexstr);
|
2018-08-18 10:03:01 -07:00
|
|
|
SDL_Color color_for_sdl(Color color);
|
2018-01-27 11:12:32 -08:00
|
|
|
|
2018-08-18 10:03:01 -07:00
|
|
|
Color color_darker(Color color, float d);
|
2018-04-29 13:57:42 -07:00
|
|
|
|
2018-08-18 10:03:01 -07:00
|
|
|
Color color_desaturate(Color color);
|
2018-01-27 11:35:15 -08:00
|
|
|
|
2019-04-28 11:49:55 -07:00
|
|
|
Color color_invert(Color c);
|
|
|
|
|
2018-01-27 11:12:32 -08:00
|
|
|
#endif // COLOR_H_
|