License Header change: Removed the LICENSE_END before beta
[scilab.git] / scilab / modules / graphics / help / en_US / color_management / name2rgb.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA
5  * 
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="name2rgb">
17     <refnamediv>
18         <refname>name2rgb</refname>
19         <refpurpose>returns the RGB values of a named color</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Calling Sequence</title>
23         <synopsis>rgb=name2rgb(name)</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>name</term>
30                 <listitem>
31                     <para>name of the color or matrix with names of the colors.</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>rgb</term>
36                 <listitem>
37                     <para>vector or matrix with 3 columns of RGB integer values of the colors.</para>
38                 </listitem>
39             </varlistentry>
40         </variablelist>
41     </refsection>
42     <refsection>
43         <title>Description</title>
44         <para>
45             <literal>name2rgb</literal> returns the RGB values of a color given by its name. The result is
46             a vector or a matrix with 3 columns <literal>[r,g,b]</literal> where <literal>r</literal>, <literal>g</literal> and <literal>b</literal> are integers between 0 and 255
47             corresponding to colors components red, green and blue. As usual 0 means no intensity and 
48             255 means all the intensity of the color.
49         </para>
50         <para>
51             If no color is found <literal>[]</literal> is returned.
52         </para>
53         <para>
54             The list of all known colors is given by <link linkend="color_list">color_list</link>.
55         </para>
56     </refsection>
57     <refsection>
58         <title>Examples</title>
59         <programlisting role="example"><![CDATA[ 
60 rgb=name2rgb("gold")
61 rgb2name(rgb)
62  ]]></programlisting>
63     </refsection>
64     <refsection role="see also">
65         <title>See Also</title>
66         <simplelist type="inline">
67             <member>
68                 <link linkend="color">color</link>
69             </member>
70             <member>
71                 <link linkend="color_list">color_list</link>
72             </member>
73             <member>
74                 <link linkend="rgb2name">rgb2name</link>
75             </member>
76         </simplelist>
77     </refsection>
78     <refsection>
79         <title>History</title>
80         <revhistory>
81             <revision>
82                 <revnumber>6.0.0</revnumber>
83                 <revremark>
84                     Function <function>name2rgb</function> can now handle a single string and a matrix of strings.
85                 </revremark>
86             </revision>
87         </revhistory>
88     </refsection>
89 </refentry>