Package: gtk

Function gtk-color-chooser-add-palette

Lambda List

gtk-color-chooser-add-palette (chooser orientation colors-per-line colors)

Arguments

chooser -- a gtk-color-chooser widget
orientation -- a value of the gtk-orientation enumeration
colors-per-line -- an integer with the number of colors to show in each row/column
colors -- a list with the gdk-rgba colors of the palette, or nil

Details

Adds a palette to the color chooser. If the orientation is :horizontal, the colors are grouped in rows, with colors-per-line colors in each row. If the orientation is :vertical, the colors are grouped in columns instead.

The default color palette of the color chooser widget has 27 colors, organized in columns of 3 colors. The default gray palette has 9 grays in a single row. The layout of the color chooser widget works best when the palettes have 9-10 columns.

Calling this function for the first time has the side effect of removing the default color and gray palettes from the color chooser. If colors is nil, removes all previously added palettes.
 

See also

*2021-1-24