nothing/src/color.h

19 lines
446 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_t {
float r, g, b, a;
} color_t;
2018-02-15 08:29:01 -08:00
// TODO(#108): color constructor can be easily shadowed in many situation
2018-01-27 11:12:32 -08:00
color_t color(float r, float g, float b, float a);
2018-02-02 07:35:11 -08:00
color_t color256(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
color_t color_from_hexstr(const char *hexstr);
2018-01-27 11:12:32 -08:00
SDL_Color color_for_sdl(color_t color);
color_t color_desaturate(color_t color);
2018-01-27 11:12:32 -08:00
#endif // COLOR_H_