|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--Colors
Represent a color. Allows for setting and getting color components based
on RGV, HSV and HSL color spaces.
See also http://en.wikipedia.org/wiki/Color_space
Defined in colors.js
| Constructor Summary | |
Colors()
|
|
| Method Summary | |
int
|
getBlue()
Get blue component of color |
int
|
getGreen()
Get green component of color |
String
|
getHex()
Get hex value of color |
array
|
getHSL()
Get hue, saturation and luminosity of color as an array |
int
|
getHue()
Get hue component of color |
int
|
getHueV()
Get hue component of color (HSV) |
int
|
getLuminosity()
Get luminosity component of color |
int
|
getRed()
Get red component of color |
array
|
getRGB()
Get red, green and blue component of color as an array |
int
|
getSaturation()
Get saturation component of color |
int
|
getSaturationV()
Get saturation component of color (HSV) |
int
|
getValue()
Get value component of color (HSV) |
int
|
setBlue(b)
Set the blue component of the color |
int
|
setGreen(g)
Set the green component of the color |
String
|
setHex(hex)
Set the color from a hex color code |
int
|
setHue(h)
Set the hue component of the color |
int
|
setHueV(h)
Set hue component of the color, using HSV http://en.wikipedia.org/wiki/HSV_color_space |
int
|
setLuminosity(l)
Set the luminosity component of the color |
int
|
setRed(r)
Set the red component of the color |
void
|
setRGB(c_arr)
Set the red, green and blue components of the color |
int
|
setSaturation(s)
Set the saturation component of the color |
int
|
setSaturationV(s)
Set the saturation component of the color, using HSV |
int
|
setValue(l)
Set the value component of the color, using HSV |
| Constructor Detail |
Colors()
| Method Detail |
int getBlue()
int getGreen()
String getHex()
array getHSL()
int getHue()
int getHueV()
int getLuminosity()
int getRed()
array getRGB()
int getSaturation()
int getSaturationV()
int getValue()
int setBlue(b)
b - {int} value of blue component
int setGreen(g)
g - {int} value of green component
String setHex(hex)
hex - {String} hex color
int setHue(h)
h - {int} desired value of hue
int setHueV(h)
h - {float} desired value of hue
int setLuminosity(l)
l - {int} desired value of luminosity
int setRed(r)
r - {int} value of red component
void setRGB(c_arr)
c_arr - {array} array containing red,green,blue ints
int setSaturation(s)
s - {int} desired value of saturation
int setSaturationV(s)
h - {float} desired value of saturation
int setValue(l)
h - {float} desired value of value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||