<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>rgb2name</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 2004</DATE>
  <SHORT_DESCRIPTION name="rgb2name"> returns the name of a color</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>names=rgb2name(r,g,b)  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>names=rgb2name(rgb)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>r,g,b</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: RGB integer values of a color.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>rgb</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector of RGB integer values of a color.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>names</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: names of the color.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>rgb2name</VERB> returns the color name corresponding to the RGB values
    given by its argument. A vector of color names can also be returned if the color has more than 1 name.
    <VERB>r</VERB>, <VERB>g</VERB> and <VERB>b</VERB> must be integers between 0 and 255
    corresponding to colors components red, green and blue. As usual 0 means no intensity and 
    255 means all the intensity of the color. RGB values can also be given by a vector <VERB>[r,g,b]</VERB>.</P>
    <P> If no color is found <VERB>[]</VERB> is returned.</P>
    <P> The list of all known colors is given by <LINK>color_list</LINK>.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
rgb2name(255,128,128)
rgb2name([255 215 0])
// get color #10 of the current colormap and find its name
cmap=get(gcf(),"color_map");
rgb2name(cmap(10,:)*255)
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>color</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>color_list</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>name2rgb</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
