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