nothing/src/color.h

21 lines
365 B
C
Raw Normal View History

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
typedef struct Color {
2018-01-27 11:12:32 -08:00
float r, g, b, a;
} 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);
SDL_Color color_for_sdl(Color color);
2018-01-27 11:12:32 -08:00
Color color_darker(Color color, float d);
Color color_desaturate(Color color);
2019-04-28 11:49:55 -07:00
Color color_invert(Color c);
2018-01-27 11:12:32 -08:00
#endif // COLOR_H_