-
getAlpha() : {number}
-
Returns the alpha channel of the color.
Returns:
The alpha channel value contained in [0,1].
-
Type
-
number
-
getBlue(doNotRound) : {number}
-
Returns the blue channel value of the color.
Parameters:
| Name |
Type |
Argument |
Description |
doNotRound |
boolean
|
<optional>
|
Omit or set to false to return an integer value.
Set to true to return the possible fractional value.
(Fractional values for the red, green, or blue channels can
arise when a color is defined using the "hsl" format.)
|
Returns:
The blue channel value contained in [0,255].
-
Type
-
number
-
getGreen(doNotRound) : {number}
-
Returns the green channel value of the color.
Parameters:
| Name |
Type |
Argument |
Description |
doNotRound |
boolean
|
<optional>
|
Omit or set to false to return an integer value.
Set to true to return the possible fractional value.
(Fractional values for the red, green, or blue channels can
arise when a color is defined using the "hsl" format.)
|
Returns:
The green channel value contained in [0,255].
-
Type
-
number
-
getRed(doNotRound) : {number}
-
Returns the red channel value of the color.
Parameters:
| Name |
Type |
Argument |
Description |
doNotRound |
boolean
|
<optional>
|
Omit or set to false to return an integer value.
Set to true to return the possible fractional value.
(Fractional values for the red, green, or blue channels can
arise when a color is defined using the "hsl" format.)
|
Returns:
The red channel value in the range [0,255].
-
Type
-
number
-
isEqual(color) : {boolean}
-
Compares this color object with the supplied color specification, and returns true
if they represent the same color, else false.
Parameters:
| Name |
Type |
Description |
color |
oj.Color
|
The color to be compared.
|
Returns:
Returns true if the comperand represents the same color.
-
Type
-
boolean
-
toString() : {string}
-
Returns the color as an "rgb" or rgba" (if the alpha value is less than 1) CSS3 color
specification string.
Returns:
The color as an "rgb" or "rgba" CSS3 color specification string.
-
Type
-
string