e36aaf67e829fc3dccd3b6633484913cf1673aec
[scilab.git] / scilab / modules / graphics / help / en_US / color_management / getcolor.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="getcolor">
17     <refnamediv>
18         <refname>getcolor</refname>
19         <refpurpose>opens a dialog to show colors in the current colormap</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Syntax</title>
23         <synopsis>c=getcolor(title,[cini])
24             c=getcolor()
25         </synopsis>
26     </refsynopsisdiv>
27     <refsection>
28         <title>Arguments</title>
29         <variablelist>
30             <varlistentry>
31                 <term>title</term>
32                 <listitem>
33                     <para>string, dialog title.</para>
34                 </listitem>
35             </varlistentry>
36             <varlistentry>
37                 <term>cini</term>
38                 <listitem>
39                     <para>initial selected color id. Default value is 1.</para>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>c</term>
44                 <listitem>
45                     <para>selected color id or [] if the selection is cancelled.</para>
46                 </listitem>
47             </varlistentry>
48         </variablelist>
49     </refsection>
50     <refsection>
51         <title>Description</title>
52         <para>
53             <literal>getcolor</literal> opens a window displaying the palette of the current colormap.
54             The user can click on a color to show its id and RGB values.
55             <literal>getcolor</literal> returns the id of the selected color or [] if the "Cancel" button has been clicked or the window closed.
56         </para>
57     </refsection>
58     <refsection>
59         <title>Examples</title>
60         <programlisting role="example"><![CDATA[
61 getcolor();
62
63 getcolor("Title foo");
64
65 getcolor("foo",21); // Select the red
66  ]]></programlisting>
67     </refsection>
68
69     <refsection role="see also">
70         <title>See also</title>
71         <simplelist type="inline">
72             <member>
73                 <link linkend="color">color</link>
74             </member>
75             <member>
76                 <link linkend="colormap">colormap</link>
77             </member>
78         </simplelist>
79     </refsection>
80 </refentry>