%% Convert 3-D HSV Array to a Truecolor Image
%
% Create a 2-by2-by-3 HSV array that specifies four shades of blue.

hsv(:,:,1) = ones(2,2)*.6;
hsv(:,:,2) = [1 .7; .3 0];
hsv(:,:,3) = ones(2,2);

%
% Convert the HSV array to a truecolor image using hsv2rgb. Then display the image.

rgb = hsv2rgb(hsv);
image(rgb);

% Copyright 2012 The MathWorks, Inc.