Pure JavaScript color picker.
- Author:
-
- Copyright:
- 2011 Data Arts Team, Google Creative Lab
- License:
- under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
- Source:
Classes
- ColorPicker
Type Definitions
callback(c, percent)
Called whenever the color is changed provided chosen color in RGB HEX format. See options.sliderIndicator.callback param of the create method.
Parameters:
Name |
Type |
Description |
c |
object
|
color
Properties
Name |
Type |
Description |
hex |
string
|
A hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue)
hexadecimal integers specify the components of the color. All values must be between 00 and FF.
Example #00ff00
|
r |
number
|
red of RGB color value. Must be between 0 and 255. |
g |
number
|
green of RGB color value. Must be between 0 and 255. |
b |
number
|
blue of RGB color value. Must be between 0 and 255. |
|
percent |
number
|
position of the mouse pointer in the percents. See details in options.direction param |
- Source:
listener()
- Source:
onError(message)
Parameters:
Name |
Type |
Description |
message |
string
|
error message |
- Source: