1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
5
<TITLE>rgb2name</TITLE>
6
<TYPE>Scilab Function</TYPE>
7
<DATE>April 2004</DATE>
8
<SHORT_DESCRIPTION name="rgb2name"> returns the name of a color</SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>names=rgb2name(r,g,b) </CALLING_SEQUENCE_ITEM>
11
<CALLING_SEQUENCE_ITEM>names=rgb2name(rgb) </CALLING_SEQUENCE_ITEM>
16
<PARAM_NAME>r,g,b</PARAM_NAME>
18
<SP>: RGB integer values of a color.</SP>
22
<PARAM_NAME>rgb</PARAM_NAME>
24
<SP>: vector of RGB integer values of a color.</SP>
28
<PARAM_NAME>names</PARAM_NAME>
30
<SP>: names of the color.</SP>
36
<P><VERB>rgb2name</VERB> returns the color name corresponding to the RGB values
37
given by its argument. A vector of color names can also be returned if the color has more than 1 name.
38
<VERB>r</VERB>, <VERB>g</VERB> and <VERB>b</VERB> must be integers between 0 and 255
39
corresponding to colors components red, green and blue. As usual 0 means no intensity and
40
255 means all the intensity of the color. RGB values can also be given by a vector <VERB>[r,g,b]</VERB>.</P>
41
<P> If no color is found <VERB>[]</VERB> is returned.</P>
42
<P> The list of all known colors is given by <LINK>color_list</LINK>.</P>
48
// get color #10 of the current colormap and find its name
49
cmap=get(gcf(),"color_map");
50
rgb2name(cmap(10,:)*255)
58
<LINK>color_list</LINK>