IupColorBrowser

Creates an element for selecting a color. The selection is done using a cylindrical projection of the RGB cube. The transformation defines a coordinate color system called HSI, that is still the RGB color space but using cylindrical coordinates.

H is for Hue, and it is the angle around the RGB cube diagonal starting at red (RGB=255 0 0).

S is for Saturation, and it is the normal distance from the color to the diagonal, normalized by its maximum value at the specified Hue. This also defines a point at the diagonal used to define I.

I is for Intensity, and it is the distance from the point defined at the diagonal to black (RGB=0 0 0). I can also be seen as the projection of the color vector onto the diagonal. But I is not linear, see Notes bellow.

This is an additional control that depends on the CD library. It is included in the Controls Library.

For a dialog that simply returns the selected color, you can use function IupGetColor.

Creation

Ihandle* IupColorBrowser(void); [in C]
iup.colorbrowser{} (elem: ihandle) [in Lua]
colorbrowser() [in LED]

The function returns the identifier of the created colorbrowser, or NULL if an error occurs.

Attributes

EXPAND: The default is "NO".

RASTERSIZE (non inheritable): the initial size is "181x181". Set to NULL to allow the automatic layout use smaller values.

RGB (non inheritable): the color selected in the control, in the "r g b"