Use the --color-selection option to create a color selection dialog.
The color selection dialog supports the following options:
Set the initial color.(ex: #FF0000)
Show the palette.
The following example script shows how to create a color selection dialog:
#!/bin/sh COLOR=`zenity --color-selection --show-palette` case $? in 0) echo "You selected $COLOR.";; 1) echo "No color selected.";; -1) echo "An unexpected error has occurred.";; esac
Got a comment? Spotted an error? Found the instructions unclear? Send feedback about this page.