|
NanoCanvas
|
Typedefs | |
| using | byte = unsigned char |
Functions | |
| static double | clamp (double x, double a, double b) |
| static double | threeway_max (double a, double b, double c) |
| static double | threeway_min (double a, double b, double c) |
| static double | hue2rgb (double h, double m1, double m2) |
| static void | hslToRgb (double h, double s, double l, byte rgb[]) |
| static void | rgbToHsl (byte r, byte g, byte b, double hsl[]) |
| static void | rgbToHsv (byte r, byte g, byte b, double hsv[]) |
| static void | hsvToRgb (double h, double s, double v, byte rgb[]) |
| using ColorConverter::byte = typedef unsigned char |
|
static |
|
static |
Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].
| double | h The hue |
| double | s The saturation |
| double | l The lightness |
|
static |
Converts an HSV color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSV_color_space. Assumes h, s, and v are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].
| double | h The hue |
| double | s The saturation |
| double | v The value |
|
static |
Converts an RGB color value to HSL. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes r, g, and b are contained in the set [0, 255] and returns h, s, and l in the set [0, 1].
| byte | r The red color value |
| byte | g The green color value |
| byte | b The blue color value |
| double | hsl[] The HSL representation |
Converts an RGB color value to HSV. Conversion formula adapted from http://en.wikipedia.org/wiki/HSV_color_space. Assumes r, g, and b are contained in the set [0, 255] and returns h, s, and v in the set [0, 1].
| byte | r The red color value |
| byte | g The green color value |
| byte | b The blue color value |
|
static |
|
static |