GPL + CeCILL Header change
[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  * === LICENSE_END ===
15  *
16  -->
17 <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">
18     <refnamediv>
19         <refname>name2rgb</refname>
20         <refpurpose>returns the RGB values of a named color</refpurpose>
21     </refnamediv>
22     <refsynopsisdiv>
23         <title>Calling Sequence</title>
24         <synopsis>rgb=name2rgb(name)</synopsis>
25     </refsynopsisdiv>
26     <refsection>
27         <title>Arguments</title>
28         <variablelist>
29             <varlistentry>
30                 <term>name</term>
31                 <listitem>
32                     <para>name of the color or matrix with names of the colors.</para>
33                 </listitem>
34             </varlistentry>
35             <varlistentry>
36                 <term>rgb</term>
37                 <listitem>
38                     <para>vector or matrix with 3 columns of RGB integer values of the colors.</para>
39                 </listitem>
40             </varlistentry>
41         </variablelist>
42     </refsection>
43     <refsection>
44         <title>Description</title>
45         <para>
46             <literal>name2rgb</literal> returns the RGB values of a color given by its name. The result is
47             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
48             corresponding to colors components red, green and blue. As usual 0 means no intensity and 
49             255 means all the intensity of the color.
50         </para>
51         <para>
52             If no color is found <literal>[]</literal> is returned.
53         </para>
54         <para>
55             The list of all known colors is given by <link linkend="color_list">color_list</link>.
56         </para>
57     </refsection>
58     <refsection>
59         <title>Examples</title>
60         <programlisting role="example"><![CDATA[ 
61 rgb=name2rgb("gold")
62 rgb2name(rgb)
63  ]]></programlisting>
64     </refsection>
65     <refsection role="see also">
66         <title>See Also</title>
67         <simplelist type="inline">
68             <member>
69                 <link linkend="color">color</link>
70             </member>
71             <member>
72                 <link linkend="color_list">color_list</link>
73             </member>
74             <member>
75                 <link linkend="rgb2name">rgb2name</link>
76             </member>
77         </simplelist>
78     </refsection>
79     <refsection>
80         <title>History</title>
81         <revhistory>
82             <revision>
83                 <revnumber>6.0.0</revnumber>
84                 <revremark>
85                     Function <function>name2rgb</function> can now handle a single string and a matrix of strings.
86                 </revremark>
87             </revision>
88         </revhistory>
89     </refsection>
90 </refentry>