Table of contents
- 1. Examples
- 2. Attributes
- 3. Properties
- 4. Methods
- 5. Related
- 6. Bugs
A palette of colors from which a user may select by clicking on one of the grid cells.
Examples

<colorpicker/>
Attributes
Inherited from XUL element
align
, allowevents
, allownegativeassertions
, class
, coalesceduplicatearcs
, collapsed
, container
, containment
, context
,
, datasources
, dir
, empty
, equalsize
, flags
, flex
, height
,
, id
, insertafter
, insertbefore
, left
, maxheight
, maxwidth
,
, minheight
, minwidth
, mousethrough
, noinitialfocus
, observes
, ordinal
, orient
, pack
, persist
, popup
, position
, preference-editable
, querytype
, ref
, removeelement
, sortDirection
, sortResource
, sortResource2
, statustext
, style
, template
, tooltip
, tooltiptext
, top
, uri
, wait-cursor
, width
disabled
true the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
disabled
property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
color
onchange
onchange attribute is called when the value of the element is changed.
preference
preference
. This attribute only has any effect when used inside a prefwindow
. More information is available in the Preferences System article.tabindex
tab" key. Elements with a higher tabindex are later in the tab sequence.
type
button, the colorpicker is displayed as a button. When the user clicks the button, a popup appears for the user to select a color.
Properties
Inherited Properties
align
,
attributes, allowEvents
,
baseURI, boxObject
, builder
,
childElementCount,
childNodes,
children, className
,
clientHeight,
clientLeft,
clientTop,
clientWidth, collapsed
, contextMenu
, controllers
, database
, datasources
, dir
,
firstChild,
firstElementChild, flex
, height
, hidden
, id
,
lastChild,
lastElementChild, left
,
localName, maxHeight
, maxWidth
, menu
, minHeight
, minWidth
,
namespaceURI,
nextElementSibling,
nextSibling,
nodeName,
nodeType,
nodeValue, observes
, ordinal
, orient
,
ownerDocument, pack
,
parentNode, persist
,
prefix,
previousElementSibling,
previousSibling, ref
, resource
,
scrollHeight,
scrollLeft,
scrollTop,
scrollWidth, statusText
, style
,
tagName,
textContent, tooltip
, tooltipText
, top
, width
accessibleType
color
open
true if the popup for a button-type colorpicker
is open. Set this property to true to open the popup or false to close the popup.value
property gets and sets
color
attribute
Methods
Related
- Interfaces
nsIDOMXULControlElement
Bugs
The onchange Event only fires if Attribute type is set to "button". You may use onclick when you are working with a plain colorpicker and need the currently selected color for example to display in a <textbox>.
Mozilla Developer Network