Chesto 0.9
A declarative and element-based library for creating GUIs on homebrew'd consoles
colorspaces.hpp
1#pragma once
2
3namespace Chesto {
4
5typedef struct {
6 double r; // a fraction between 0 and 1
7 double g; // a fraction between 0 and 1
8 double b; // a fraction between 0 and 1
9} rgb;
10
11typedef struct {
12 double h; // angle in degrees
13 double s; // a fraction between 0 and 1
14 double v; // a fraction between 0 and 1
15} hsv;
16
17hsv rgb2hsv(rgb in);
18rgb hsv2rgb(hsv in);
19rgb fromRGB(int r, int g, int b);
20rgb randomColor();
21
22} // namespace Chesto