XUL Programmer's Reference Manual | ||||||||||
<colorpicker> |
||||||||||
<colorpicker> is a palette widget that can be used to select colors in a XUL application. The following sample shows the user of the colorpicker element and a function which returns the selected color:
The example above gets the color from the displayed palette, displays the value of the chosen color in the input field, and changes the background color of the html:div element "mydiv" to the chosen color. |
||||||||||
type | ||||||||||
DescriptionThe type attribute specifies what kind of colorpicker is to be used. Syntax<colorpicker type="swatch" /> Example<colorpicker type="swatch" /> NotesThis attribute does not need to be specified. Swatch is the only colorpicker type supported currently, and it is the default when this attribute is not explicit. |
||||||||||
palettename | ||||||||||
Descriptionpalettename is na optional attribute for specifying what kind of palette to load into the colorpicker. Syntax<colorpicker palettename="gray | standard | web" /> Example<colorpicker palettename="standard" /> NotesThe default value for the container attribute is "standard". "Web" is the 216 color palette, and "gray" is the grayscale palette.
|
Last updated: 13:10 1/26/00 Ian Oeschger