Classes
AddedRemovedEvent
AlertElement
AnchorContainerElement
ArrowShape
ButtonElement
CanvasElement
CanvasManager
CheckboxElement
CheckboxSkinElement
CollectionChangedEvent
CollectionSort
ColorPickerButtonElement
ColorPickerElement
ContainerBaseElement
CursorDefinition
DataGridColumnDefinition
DataGridDataRenderer
DataGridElement
DataGridHeaderColumnDividerSkinElement
DataGridHeaderElement
DataGridHeaderItemRenderer
DataGridItemData
DataGridItemRendererBase
DataGridLabelItemRenderer
DataListData
DataListElement
DataRendererBaseElement
DataRendererLabelElement
DatePickerButtonElement
DatePickerElement
DispatcherEvent
DrawMetrics
DropdownArrowButtonSkinElement
DropdownBaseElement
DropdownElement
ElementEvent
ElementGridItemClickEvent
ElementKeyboardEvent
ElementListItemClickEvent
ElementMouseEvent
ElementMouseWheelEvent
EllipseShape
EventDispatcher
FillBase
GridContainerElement
GridContainerRowColumnDefinition
ImageElement
IpInputElement
LabelElement
LinearGradientFill
ListCollection
ListContainerElement
ProgressElement
RadioButtonElement
RadioButtonSkinElement
RoundedRectangleShape
ScrollBarElement
ScrollButtonSkinElement
ShapeBase
SkinnableElement
SolidFill
StyleableBase
StyleChangedEvent
StyleData
StyleDefinition
StyleProxy
TextAreaElement
TextElement
TextFieldElement
TextInputElement
TimeInputElement
ToggleButtonElement
ToggleButtonGroup
Tween
ViewportElement


ColorPickerElement

ColorPickerElement is a class used to select colors.

Inheritance:     ColorPickerElement ➞ CanvasElementStyleableBaseStyleDefinitionEventDispatcher ➞ Object

Styles
Show Inherited
Style Defined By
TextInputColorStyle     :    StyleDefinition ColorPickerElement
The StyleDefinition or [StyleDefinition] array to apply to the TextInput color element.
 


Events
Show Inherited
Event Defined By
changed     :    ElementEvent ColorPickerElement
Dispatched when the ColorPicker's selection state changes as a result of user interaction.
 


Public Functions
Show Inherited
Function Defined By
ColorPickerElement() [Constructor] ColorPickerElement
Creates new ColorPickerElement instance.
 
getHexColor() ColorPickerElement
Gets the selected color of the ColorPickerElement.
  returns     :    String
RGB hex color value formatted as "#FF0000".
 
hexToRgb(hex) [Static] ColorPickerElement
Converts Hex color string to RGB values.
  hex     :    String
Hex string value formatted like "#FF0000"
  returns     :    Object
An object {r:0, g:0, b:0} containing r, g, and b
properties representing red, green, and blue channels.
 
hslToRgb(h, s, l) [Static] ColorPickerElement
Converts HSL values to RGB values. Fractional HSL
values are allowed.
  h     :    Number
Value of the hue (0 - 360)
  s     :    Number
Value of the saturation (0-100)
  l     :    Number
Value of lightness (0-100)
  returns     :    Object
An object {r:0, g:0, b:0} containing r, g, and b
properties representing red, green, and blue channels.
 
rgbToHex(r, g, b) [Static] ColorPickerElement
Converts RGB values to hex format.
  r     :    Number
Value of the red channel (0-255)
  g     :    Number
Value of the green channel (0-255)
  b     :    Number
Value of the blue channel (0-255)
  returns     :    String
Hex string value formatted like "#FF0000"
 
rgbToHsl(r, g, b) [Static] ColorPickerElement
Converts RGB values to HSL values.
  r     :    Number
Value of the red channel (0-255)
  g     :    Number
Value of the green channel (0-255)
  b     :    Number
Value of the blue channel (0-255)
  returns     :    Object
An object {h:0, s:0, l:0} containing h, s, and l
properties representing hue, saturation, and lightness.
Note that fractional HSL values may be returned.
 
setHexColor(value) ColorPickerElement
Sets the selected color of the ColorPickerElement.
  value     :    String
RGB hex color value formatted as "#FF0000".
 


Internal Members
Show Inherited


Internal Functions
Show Inherited
Function Defined By
_layoutCarets() ColorPickerElement
Sizes and positions the hue bar and picker area carets.
 
_onHueBarMouseDown(elementMouseEvent) ColorPickerElement
Event handler for the hue bar's "mousedown" event.
Updates the ColorPicker's selected hue & color and dispatches changed event.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onHueBarMouseMoveEx(elementMouseEvent) ColorPickerElement
Event handler for the hue bar's "mousemoveex" event.
Updates the ColorPicker's selected hue & color and dispatches changed event.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onHueBarMouseUp(elementMouseEvent) ColorPickerElement
Event handler for the hue bar's "mouseup" event.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onPickerAreaMouseDown(elementMouseEvent) ColorPickerElement
Event handler for the picker area's "mousedown" event.
Updates the ColorPicker's selected color and dispatches changed event.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onPickerAreaMouseMoveEx(elementMouseEvent) ColorPickerElement
Event handler for the picker area's "mousemoveex" event.
Updates the ColorPicker's selected color and dispatches changed event.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onPickerAreaMouseUp(elementMouseEvent) ColorPickerElement
Event handler for the picker area's "mouseup" event.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onTextInputColorChanged(elementEvent) ColorPickerElement
Event handler for the text input's "changed" event.
Updates the picker's selected color.
  elementEvent     :    ElementEvent
The ElementEvent to process.
 
_updateSelectedHsl() ColorPickerElement
Updates the selected color swatch and TextInput when color is set via HSL.
 
_updateSelectedHue() ColorPickerElement
Updates the picker area's background hue.
 
_updateSelectedRgb() ColorPickerElement
Updates the selected color swatch and HSL values when color set via RGB.