13846a8964752ccff07fe3a12d85cd4896d84e77
[scilab.git] / scilab / modules / graphics / help / en_US / color_management / uigetcolor.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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="uigetcolor">
3     <refnamediv>
4         <refname>uigetcolor</refname>
5         <refpurpose>Opens a dialog for selecting a color.</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>
10             uigetcolor()
11             RGB = uigetcolor([title])
12             RGB = uigetcolor([title,] defaultRGB)
13             RGB = uigetcolor([title,] defaultRed, defaultGreen, defaultBlue)
14             [R, G, B] = uigetcolor([title])
15             [R, G, B] = uigetcolor([title,] defaultRGB)
16             [R, G, B] = uigetcolor([title,] defaultRed, defaultGreen, defaultBlue)
17         </synopsis>
18     </refsynopsisdiv>
19     <refsection>
20         <title>Arguments</title>
21         <variablelist>
22             <varlistentry>
23                 <term>title</term>
24                 <listitem>
25                     <para>String: Optional argument, the title to display in the dialog. Default value is "Color Chooser".</para>
26                 </listitem>
27             </varlistentry>
28             <varlistentry>
29                 <term>defaultRGB</term>
30                 <listitem>
31                     <para>1x3 vector: the default values for Red, Green and Blue values given as a vector [red, green, blue].</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>defaultRed</term>
36                 <listitem>
37                     <para>Scalar: the default value for red.</para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>defaultGreen</term>
42                 <listitem>
43                     <para>Scalar: the default value for green.</para>
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>defaultBlue</term>
48                 <listitem>
49                     <para>Scalar: the default value for blue.</para>
50                 </listitem>
51             </varlistentry>
52             <varlistentry>
53                 <term>RGB</term>
54                 <listitem>
55                     <para>1x3 vector: the values for Red, Green and Blue values given as a vector [red, green, blue] or [] if the user cancels.</para>
56                 </listitem>
57             </varlistentry>
58             <varlistentry>
59                 <term>R</term>
60                 <listitem>
61                     <para>Scalar: the value for red or [] if the user cancels.</para>
62                 </listitem>
63             </varlistentry>
64             <varlistentry>
65                 <term>G</term>
66                 <listitem>
67                     <para>Scalar: the value for green or [] if the user cancels.</para>
68                 </listitem>
69             </varlistentry>
70             <varlistentry>
71                 <term>B</term>
72                 <listitem>
73                     <para>Scalar: the value for blue or [] if the user cancels.</para>
74                 </listitem>
75             </varlistentry>
76         </variablelist>
77     </refsection>
78     <refsection>
79         <title>Description</title>
80         <para>Creates a dialog window for selecting a color. All (default and returned) values must be in the interval [0 255].</para>
81     </refsection>
82     <refsection>
83         <title>Examples</title>
84         <programlisting role="example"><![CDATA[
85 uigetcolor()
86 [R, G, B] = uigetcolor([255 128 0])
87 RBG = uigetcolor(0, 128, 255)
88 RBG = uigetcolor("My color chooser", 0, 128, 255)
89  ]]></programlisting>
90     </refsection>
91     <refsection role="see also">
92         <title>See also</title>
93         <simplelist type="inline">
94             <member>
95                 <link linkend="getcolor">getcolor</link>
96             </member>
97         </simplelist>
98     </refsection>
99 </refentry>