1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="color-selection" xml:lang="el">
4
<link type="guide" xref="index#dialogs"/>
5
<desc>Use the <cmd>--color-selection</cmd> option.</desc>
7
<title>Color Selection Dialog</title>
9
Use the <cmd>--color-selection</cmd> option to create a color selection dialog.
12
The color selection dialog supports the following options:
18
<title><cmd>--color</cmd>=<var>VALUE</var></title>
19
<p>Set the initial color.(ex: #FF0000)</p>
23
<title><cmd>--show-palette</cmd></title>
24
<p>Show the palette.</p>
30
The following example script shows how to create a color selection dialog:
36
COLOR=`zenity --color-selection --show-palette`
40
echo "You selected $COLOR.";;
42
echo "No color selected.";;
44
echo "An unexpected error has occurred.";;
48
<figure id="zenity-colorselection-screenshot">
49
<title>Color Selection Dialog Example</title>
50
<desc><app>Zenity</app> color selection dialog example</desc>
51
<media type="image" mime="image/png" src="figures/zenity-colorselection-screenshot.png"/>