Hue-saturation-value to red-green-blue conversion.
M = HSV2RGB(H) converts an HSV color map to an RGB color map.
Each map is a matrix with any number of rows, exactly three columns,
and elements in the interval 0 to 1. The columns of the input matrix,
H, represent hue, saturation and value, respectively. The columns of
the resulting output matrix, M, represent intensity of red, blue and
As H(:,1), the hue, varies from 0 to 1, the resulting color varies
from red, through yellow, green, cyan, blue and magenta, back to red.
When H(:,2), the saturation, is 0, the colors are unsaturated; they
are simply shades of gray. When H(:,2) is 1, the colors are fully
saturated; they contain no white component. When H(:,3), the color
value, varies from 0 to 1, the brightness increases.
The default colormap, HSV , is hsv2rgb([h s v]) where
h is a linear ramp from 0 to 1 and both s and v are all 1's.
See also RGB2HSV , COLORMAP , RGBPLOT .