Functions | |
Vector3 | convertRGBtoHSV (Vector3) |
Convert an RGB color triplet to the alternative color space HSV (Hue, Saturation, Value). | |
Vector3 | convertHSVtoRGB (Vector3) |
Convert a triplet from the HSV (Hue, Saturation, Value) color space to RGB. | |
Vector3 | interp (double x, double x1, double x2, Vector3 y1, Vector3 y2) |
Linear interpolation of RGB colors in the HSV space. | |
Variables | |
const Vector3 | aliceblue (240/255.0, 248/255.0, 255/255.0) |
const Vector3 | antiquewhite (250/255.0, 235/255.0, 215/255.0) |
const Vector3 | aqua (0/255.0, 255/255.0, 255/255.0) |
const Vector3 | aquamarine (127/255.0, 255/255.0, 212/255.0) |
const Vector3 | azure (240/255.0, 255/255.0, 255/255.0) |
const Vector3 | beige (245/255.0, 245/255.0, 220/255.0) |
const Vector3 | bisque (255/255.0, 228/255.0, 196/255.0) |
const Vector3 | black (0/255.0, 0/255.0, 0/255.0) |
const Vector3 | blanchedalmond (255/255.0, 235/255.0, 205/255.0) |
const Vector3 | blue (0/255.0, 0/255.0, 255/255.0) |
const Vector3 | blueviolet (138/255.0, 43/255.0, 226/255.0) |
const Vector3 | brown (165/255.0, 42/255.0, 42/255.0) |
const Vector3 | burlywood (222/255.0, 184/255.0, 135/255.0) |
const Vector3 | cadetblue (95/255.0, 158/255.0, 160/255.0) |
const Vector3 | chartreuse (127/255.0, 255/255.0, 0/255.0) |
const Vector3 | chocolate (210/255.0, 105/255.0, 30/255.0) |
const Vector3 | coral (255/255.0, 127/255.0, 80/255.0) |
const Vector3 | cornflowerblue (100/255.0, 149/255.0, 237/255.0) |
const Vector3 | cornsilk (255/255.0, 248/255.0, 220/255.0) |
const Vector3 | crimson (220/255.0, 20/255.0, 54/255.0) |
const Vector3 | cyan (0/255.0, 255/255.0, 255/255.0) |
const Vector3 | darkblue (0/255.0, 0/255.0, 139/255.0) |
const Vector3 | darkcyan (0/255.0, 139/255.0, 139/255.0) |
const Vector3 | darkgoldenrod (184/255.0, 134/255.0, 11/255.0) |
const Vector3 | darkgray (169/255.0, 169/255.0, 169/255.0) |
const Vector3 | darkgreen (0/255.0, 100/255.0, 0/255.0) |
const Vector3 | darkkhaki (189/255.0, 183/255.0, 107/255.0) |
const Vector3 | darkmagenta (139/255.0, 0/255.0, 139/255.0) |
const Vector3 | darkolivegreen (85/255.0, 107/255.0, 47/255.0) |
const Vector3 | darkorange (255/255.0, 140/255.0, 0/255.0) |
const Vector3 | darkorchid (153/255.0, 50/255.0, 204/255.0) |
const Vector3 | darkred (139/255.0, 0/255.0, 0/255.0) |
const Vector3 | darksalmon (233/255.0, 150/255.0, 122/255.0) |
const Vector3 | darkseagreen (143/255.0, 188/255.0, 143/255.0) |
const Vector3 | darkslateblue (72/255.0, 61/255.0, 139/255.0) |
const Vector3 | darkslategray (47/255.0, 79/255.0, 79/255.0) |
const Vector3 | darkturquoise (0/255.0, 206/255.0, 209/255.0) |
const Vector3 | darkviolet (148/255.0, 0/255.0, 211/255.0) |
const Vector3 | deeppink (255/255.0, 20/255.0, 147/255.0) |
const Vector3 | deepskyblue (0/255.0, 191/255.0, 255/255.0) |
const Vector3 | dimgray (105/255.0, 105/255.0, 105/255.0) |
const Vector3 | dodgerblue (30/255.0, 144/255.0, 255/255.0) |
const Vector3 | firebrick (178/255.0, 34/255.0, 34/255.0) |
const Vector3 | floralwhite (255/255.0, 250/255.0, 240/255.0) |
const Vector3 | forestgreen (34/255.0, 139/255.0, 34/255.0) |
const Vector3 | fuchsia (255/255.0, 0/255.0, 255/255.0) |
const Vector3 | gainsboro (220/255.0, 220/255.0, 220/255.0) |
const Vector3 | ghostwhite (248/255.0, 248/255.0, 255/255.0) |
const Vector3 | gold (255/255.0, 215/255.0, 0/255.0) |
const Vector3 | goldenrod (218/255.0, 165/255.0, 32/255.0) |
const Vector3 | gray (128/255.0, 128/255.0, 128/255.0) |
const Vector3 | green (0/255.0, 128/255.0, 0/255.0) |
const Vector3 | greenyellow (173/255.0, 255/255.0, 47/255.0) |
const Vector3 | honeydew (240/255.0, 255/255.0, 240/255.0) |
const Vector3 | hotpink (255/255.0, 105/255.0, 180/255.0) |
const Vector3 | indianred (205/255.0, 92/255.0, 92/255.0) |
const Vector3 | indigo (75/255.0, 0/255.0, 130/255.0) |
const Vector3 | ivory (255/255.0, 255/255.0, 240/255.0) |
const Vector3 | khaki (240/255.0, 230/255.0, 140/255.0) |
const Vector3 | lavender (230/255.0, 230/255.0, 250/255.0) |
const Vector3 | lavenderblush (255/255.0, 240/255.0, 245/255.0) |
const Vector3 | lawngreen (124/255.0, 252/255.0, 0/255.0) |
const Vector3 | lemonchiffon (255/255.0, 250/255.0, 205/255.0) |
const Vector3 | lightblue (173/255.0, 216/255.0, 230/255.0) |
const Vector3 | lightcoral (240/255.0, 128/255.0, 128/255.0) |
const Vector3 | lightcyan (224/255.0, 255/255.0, 255/255.0) |
const Vector3 | lightgoldenrodyellow (250/255.0, 250/255.0, 210/255.0) |
const Vector3 | lightgreen (144/255.0, 238/255.0, 144/255.0) |
const Vector3 | lightgrey (211/255.0, 211/255.0, 211/255.0) |
const Vector3 | lightpink (255/255.0, 182/255.0, 193/255.0) |
const Vector3 | lightsalmon (255/255.0, 160/255.0, 122/255.0) |
const Vector3 | lightseagreen (32/255.0, 178/255.0, 170/255.0) |
const Vector3 | lightskyblue (135/255.0, 206/255.0, 250/255.0) |
const Vector3 | lightslategray (119/255.0, 136/255.0, 153/255.0) |
const Vector3 | lightsteelblue (176/255.0, 196/255.0, 222/255.0) |
const Vector3 | lightyellow (255/255.0, 255/255.0, 224/255.0) |
const Vector3 | lime (0/255.0, 255/255.0, 0/255.0) |
const Vector3 | limegreen (50/255.0, 205/255.0, 50/255.0) |
const Vector3 | linen (250/255.0, 240/255.0, 230/255.0) |
const Vector3 | magenta (255/255.0, 0/255.0, 255/255.0) |
const Vector3 | maroon (128/255.0, 0/255.0, 0/255.0) |
const Vector3 | mediumaquamarine (102/255.0, 205/255.0, 170/255.0) |
const Vector3 | mediumblue (0/255.0, 0/255.0, 205/255.0) |
const Vector3 | mediumorchid (186/255.0, 85/255.0, 211/255.0) |
const Vector3 | mediumpurple (147/255.0, 112/255.0, 219/255.0) |
const Vector3 | mediumseagreen (60/255.0, 179/255.0, 113/255.0) |
const Vector3 | mediumslateblue (123/255.0, 104/255.0, 238/255.0) |
const Vector3 | mediumspringgreen (0/255.0, 250/255.0, 154/255.0) |
const Vector3 | mediumturquoise (72/255.0, 209/255.0, 204/255.0) |
const Vector3 | mediumvioletred (199/255.0, 21/255.0, 133/255.0) |
const Vector3 | midnightblue (25/255.0, 25/255.0, 112/255.0) |
const Vector3 | mintcream (245/255.0, 255/255.0, 250/255.0) |
const Vector3 | mistyrose (255/255.0, 228/255.0, 225/255.0) |
const Vector3 | moccasin (255/255.0, 228/255.0, 181/255.0) |
const Vector3 | navajowhite (255/255.0, 222/255.0, 173/255.0) |
const Vector3 | navy (0/255.0, 0/255.0, 128/255.0) |
const Vector3 | oldlace (253/255.0, 245/255.0, 230/255.0) |
const Vector3 | olive (128/255.0, 128/255.0, 0/255.0) |
const Vector3 | olivedrab (107/255.0, 142/255.0, 35/255.0) |
const Vector3 | orange (255/255.0, 165/255.0, 0/255.0) |
const Vector3 | orangered (255/255.0, 69/255.0, 0/255.0) |
const Vector3 | orchid (218/255.0, 112/255.0, 214/255.0) |
const Vector3 | palegoldenrod (238/255.0, 232/255.0, 170/255.0) |
const Vector3 | palegreen (152/255.0, 251/255.0, 152/255.0) |
const Vector3 | paleturquoise (175/255.0, 238/255.0, 238/255.0) |
const Vector3 | palevioletred (219/255.0, 112/255.0, 147/255.0) |
const Vector3 | papayawhip (255/255.0, 239/255.0, 213/255.0) |
const Vector3 | peachpuff (255/255.0, 218/255.0, 185/255.0) |
const Vector3 | peru (205/255.0, 133/255.0, 63/255.0) |
const Vector3 | pink (255/255.0, 192/255.0, 203/255.0) |
const Vector3 | plum (221/255.0, 160/255.0, 221/255.0) |
const Vector3 | powderblue (176/255.0, 224/255.0, 230/255.0) |
const Vector3 | purple (128/255.0, 0/255.0, 128/255.0) |
const Vector3 | red (255/255.0, 0/255.0, 0/255.0) |
const Vector3 | rosybrown (188/255.0, 143/255.0, 143/255.0) |
const Vector3 | royalblue (65/255.0, 105/255.0, 225/255.0) |
const Vector3 | saddlebrown (139/255.0, 69/255.0, 19/255.0) |
const Vector3 | salmon (250/255.0, 128/255.0, 114/255.0) |
const Vector3 | sandybrown (244/255.0, 164/255.0, 96/255.0) |
const Vector3 | seagreen (46/255.0, 139/255.0, 87/255.0) |
const Vector3 | seashell (255/255.0, 245/255.0, 238/255.0) |
const Vector3 | sienna (160/255.0, 82/255.0, 45/255.0) |
const Vector3 | silver (192/255.0, 192/255.0, 192/255.0) |
const Vector3 | skyblue (135/255.0, 206/255.0, 235/255.0) |
const Vector3 | slateblue (106/255.0, 90/255.0, 205/255.0) |
const Vector3 | slategray (112/255.0, 128/255.0, 144/255.0) |
const Vector3 | snow (255/255.0, 250/255.0, 250/255.0) |
const Vector3 | springgreen (0/255.0, 255/255.0, 127/255.0) |
const Vector3 | steelblue (70/255.0, 130/255.0, 180/255.0) |
const Vector3 | tan (210/255.0, 180/255.0, 140/255.0) |
const Vector3 | teal (0/255.0, 128/255.0, 128/255.0) |
const Vector3 | thistle (216/255.0, 191/255.0, 216/255.0) |
const Vector3 | tomato (255/255.0, 99/255.0, 71/255.0) |
const Vector3 | turquoise (64/255.0, 224/255.0, 208/255.0) |
const Vector3 | violet (238/255.0, 130/255.0, 238/255.0) |
const Vector3 | wheat (245/255.0, 222/255.0, 179/255.0) |
const Vector3 | white (255/255.0, 255/255.0, 255/255.0) |
const Vector3 | whitesmoke (245/255.0, 245/255.0, 245/255.0) |
const Vector3 | yellow (255/255.0, 255/255.0, 0/255.0) |
const Vector3 | yellowgreen (154/255.0, 205/255.0, 50/255.0) |
|
Convert a triplet from the HSV (Hue, Saturation, Value) color space to RGB. Note that it is not required that the value of the HSV triplet is less than or equal to 1, but it must not be negative.
Definition at line 45 of file color.C. Referenced by interp(). |
|
Convert an RGB color triplet to the alternative color space HSV (Hue, Saturation, Value). Note that it is not required that the components of the RGB triplet are less than or equal to 1, but they may not be negative.
Definition at line 32 of file color.C. References Archon::Math::BasicVector< T, N >::max(), and Archon::Math::BasicVector< T, N >::min(). Referenced by interp(). |
|
Linear interpolation of RGB colors in the HSV space. Three matters will need further clairification: Because the HSV space is cylindrical (or you could say, because the hue component is an angle, and angles are cyclic) there are generally two paths that takes us from the first point to the second. Clockwise and counter clockwise around the value axis. Unless the two colors are complementary to each other, one of the paths will be shortest, and this function chooses that one. If the two colors are complementary to each other it is undefined which one will be chosen. If one of the colors (not both) have an abritrary/undefined hue component (when the saturation component is zero / the achromatic case), then the interpolation will use the hue component from the other color for every interpolated color. This is sensible since any other hue will look artificial. If one of the colors (not both) have an abritrary/undefined saturation component (when the value component is zero / black), then the interpolation will use the saturation component from the other color for every interpolated color. This is sensible since any other saturation will look artificial.
Definition at line 70 of file color.C. References convertHSVtoRGB(), convertRGBtoHSV(), and Archon::Math::linInterp(). |