#include <Color.h>
Inheritance diagram for prapi::HSVColor< T >:

The H channel varies in the range [0,360). S channel is in the range [0,1] for data types float and double. For int, the range is [0,255]. The value of V can be just about anything.
Public Methods | |
| HSVColor (T clr=0) | |
| Create a new HSV color with all channels set to clr. | |
| HSVColor (T r, T g, T b) | |
| Create a new HSV color with color channels set as indicated. | |
| template<class U> | HSVColor (const Color< U, 3 > &other) |
| Copy any three-component color. | |
| HSVColor (const Color< T, 3 > &other) | |
| Copy any three-component color with the same content type. | |
| HSVColor (const RGBColor< T > &other) | |
| Convert an RGB color to HSV. | |
| T | getHue () const |
| Get the value of the 'hue' channel. | |
| T | getSaturation () const |
| Get the value of the 'saturation' channel. | |
| T | getValue () const |
| Get the value of the 'value' channel. | |
| void | setHue (T value) |
| Set hue. | |
| void | setSaturation (T value) |
| Set saturation. | |
| void | setValue (T value) |
| Set value. | |
| operator int () const | |
| Get the intensity (V) channel as an integer. | |
| operator float () const | |
| Get the intensity (V) channel as a float. | |
| operator double () const | |
| Get the intensity (V) channel as a double. | |
| operator RGBColor () const | |
| Convert this color to the RGB color space. | |
| template<class U> HSVColor & | operator= (const Color< U, 3 > &other) |
| Copy any three-component color. | |
| HSVColor & | operator= (const Color< T, 3 > &other) |
| Copy a three-component color of the same content type. | |
Friends | |
| class | RGBColor< T > |
|
||||||||||
|
Convert an RGB color to HSV.
|
|
|||||||||
|
Convert this color to the RGB color space. For integer-valued HSV colors, the saturation channel must be in the range [0,255]. Preferably, the value channel should also be in this range. The hue channel must be in [0,360) independent of the content type. For floating point content types, saturation must and value should be in the range [0,1]. |