new Color(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
* |
Properties
|
Fires:
- event:color
Extends
Methods
-
addPaletteColor(color, title, select)
-
Add color to palette
Parameters:
Name Type Description color
ol.colorLike title
string select
boolean -
collapse( [b])
-
show/hide color picker
Parameters:
Name Type Argument Default Description b
boolean <optional>
false - Inherited From:
- Overrides:
-
getColor( [opacity])
-
Get current color
Parameters:
Name Type Argument Default Description opacity
boolean <optional>
true Returns:
- Type
- Array.<number>
-
getColorFromID(id)
-
Convert color to id
Parameters:
Name Type Description id
number Returns:
Color
- Type
- Array.<number>
-
getColorID(Color)
-
Convert color to id
Parameters:
Name Type Description Color
ol.colorLike Returns:
- Type
- number
-
getInputElement()
-
Get the input element
- Inherited From:
- Overrides:
Returns:
- Type
- Element
-
getTab()
-
Show palette or picker tab
Returns:
palette or picker
- Type
- string
-
getValue()
-
Get the current getValue
- Inherited From:
- Overrides:
Returns:
- Type
- string
-
isCollapsed()
-
Is the popup collapsed ?
- Inherited From:
- Overrides:
Returns:
- Type
- boolean
-
setColor(color)
-
Set Color
Parameters:
Name Type Description color
Array.<number> -
setValue()
-
Set the current value
- Inherited From:
- Overrides:
-
showTab(what)
-
Show palette or picker tab
Parameters:
Name Type Description what
string palette or picker
-
toggle()
-
Toggle the popup
- Inherited From:
- Overrides: