<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>hsv2rgb</TITLE>
  <TYPE>Scilab Function  </TYPE>
  <DATE>9-Jun-2005</DATE>
  <SHORT_DESCRIPTION name="hsv2rgb"> Converts HSV colors to RGB</SHORT_DESCRIPTION>

  <CALLING_SEQUENCE>
  <CALLING_SEQUENCE_ITEM>[r,g,b] = hsv2rgb(h,s,v)</CALLING_SEQUENCE_ITEM>
  <CALLING_SEQUENCE_ITEM>rgb = hsv2rgb(h,s,v)</CALLING_SEQUENCE_ITEM>
  <CALLING_SEQUENCE_ITEM>[r,g,b] = hsv2rgb(hsv)</CALLING_SEQUENCE_ITEM>
  <CALLING_SEQUENCE_ITEM>rgb = hsv2rgb(hsv)</CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>

  <PARAM>
  <PARAM_INDENT>

    <PARAM_ITEM>
    <PARAM_NAME>h</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       :  a vector of size n. The "hue" values.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>s</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       :  a vector of size n. The "saturation" values.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>v</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       :  a vector of size n. The "value" values
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

      <PARAM_ITEM>
	<PARAM_NAME>hsv</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       :  a n x 3 matrix. Each row contains a [hue saturation value] tripple.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>r</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       :  a column vector of size n. The associated "red" values.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>g</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       : a column vector of size n. The associated "green" values.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>b</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       : a column vector of size n. The associated "blue" values.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

  <PARAM_ITEM>
    <PARAM_NAME>rgb</PARAM_NAME>
    <PARAM_DESCRIPTION>
       <SP>
       :  a n x 3 matrix. Each row contains a [red green blue] tripple.
       </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

  </PARAM_INDENT>
  </PARAM>
 
  <DESCRIPTION>
  <SP>The function hsv2rgb converts colormaps
      between the RGB and HSV color spaces. As hue varies from 0 to 1.0,
      the corresponding colors vary from red through yellow, green, cyan, blue,
      magenta, and back to red, so that there are actually red values both at 0
      and 1.0. As saturation varies from 0 to 1.0, the corresponding colors
      (hues) vary from unsaturated (shades of gray) to fully saturated (no
      white component). As value, or brightness, varies from 0 to 1.0, the
      corresponding colors become increasingly brighter. </SP>
  </DESCRIPTION>

  <EXAMPLE><![CDATA[
    t=[0:0.3:2*%pi]'; z=sin(t)*cos(t'); 
    plot3d1(t,t,z) 
    f=gcf();f.pixmap='on';
    for h=0:0.1:1
      hsv=[h*ones(32,1) linspace(0,1,32)' 0.7*ones(32,1)];
      f.color_map=hsv2rgb(hsv);
      show_pixmap()
      xpause(10000)
    end
    for v=0:0.1:1
      hsv=[ones(32,1) linspace(0,1,32)' v*ones(32,1)];
      f.color_map=hsv2rgb(hsv);
      show_pixmap()
      xpause(10000)
    end
  ]]></EXAMPLE>


  <AUTHORS>
    <AUTHORS_ITEM label='Serge Steer'>
    INRIA
    </AUTHORS_ITEM>
  </AUTHORS>

</MAN>
