1. Yad Color

Display color selection dialog.

Command
yad --color
yad color
Figure 1. Color dialog

1.1. --init-color=COLOR

Set initial color value.

Command
yad --color --init-color=red
yad color init color red
Figure 2. Color dialog with color set to red

Output will be: #ff0000

or

Command
yad --color --init-color=#008080
yad color init color 008080
Figure 3. Color dialog with color set to #008080

Output will be: #008080

1.2. --gtk-palette

Show system palette in color dialog.

Command
yad --color --gtk-palette
yad color gtk palette
Figure 4. Color dialog with gtk-palette

1.3. --palette=FILENAME

Show palette and set predefined colors from given filename.
Default: /usr/share/X11/rgb.txt

Command
yad --color --palette=FILENAME

1.4. --picker

Add screen color picker button.

Command
yad --color --picker
yad color picker
Figure 5. Color dialog with a color picker button

1.5. --mode=MODE

Set output mode to MODE.

Command
yad --mode=MODE

Possible values are hex or rgb.
Default is hex.

HEX mode looks like #rrggbbaa, RGB mode - rgba(r, g, b, a).
In RGBA mode opacity have values from 0.0 to 1.0.

Command
yad --color --mode=rgb

The output will be: rgb(257,0, 0,0, 0,0) or rgba(255,0,0,0.540541)

1.6. --alpha

Add opacity to output color value.

Command
yad --color --init-color=red --alpha
yad color init color alpha
Figure 6. Color dialog with alpha enabled

The output will be: #FF00007B

Back to YAD Guide