Hue-saturation-value to RGB conversion.
M = hsv2rgb(H)
M = hsv2rgb(H)
converts a hue-saturation-value colormap to a red-green-blue (RGB) colormap. Each map is a matrix with any number of rows, exactly three columns, and elements in the interval from 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 intensities of red, green, and blue, respectively.
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)
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 and the brightness increases.
The MATLAB 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 1s.
brighten
,colormap
,hsv
,rgb2hsv
(c) Copyright 1994 by The MathWorks, Inc.