new lime.fill.Color(clr)
Color fill
Parameters:
Name | Type | Description |
---|---|---|
clr |
* | Color value. |
- Source:
- fill/color.js, line 15
Extends
Summary
Members |
||
---|---|---|
id :string
Common name for color objects
|
Inherited
Methods |
||
---|---|---|
addBrightness (value) → {lime.fill.Color}
Make color lighter
|
||
addSaturation (value) → {lime.fill.Color}
Make color more saturated
|
||
clone () → {lime.fill.Color}
Clone the color
|
||
equals (a) → {boolean}
Compares a {lime.fill.Color} to the calling {lime.fill.Color}
instance for equality of RGBa values.
|
||
getRgba () → {null|Array.<number>}
Gets color as RGBA array.
|
||
modifyColor (mode, value) → {lime.fill.Color}
Modify color value
|
||
setCanvasStyle ()
|
||
setColor (clr) → {lime.fill.Color}
Set color value of the object. Accepts raw RGB(A) values and strings.
|
||
setDOMStyle ()
|
Members
-
id :string
-
Common name for color objects
- Source:
- fill/color.js, line 29
Methods
-
addBrightness(value) → {lime.fill.Color}
-
Make color lighter
Parameters:
Name Type Description value
number Brightness factor. - Source:
- fill/color.js, line 58
Returns:
object itself.- Type
- lime.fill.Color
-
addSaturation(value) → {lime.fill.Color}
-
Make color more saturated
Parameters:
Name Type Description value
number Saturation factor. - Source:
- fill/color.js, line 90
Returns:
ibject itself.- Type
- lime.fill.Color
-
clone() → {lime.fill.Color}
-
Clone the color
- Source:
- fill/color.js, line 139
Returns:
New cloned color.- Type
- lime.fill.Color
-
equals(a) → {boolean}
-
Compares a {lime.fill.Color} to the calling {lime.fill.Color} instance for equality of RGBa values.
Parameters:
Name Type Description a
lime.fill.Color A Color instance. - Source:
- fill/color.js, line 155
Returns:
True if the RGBa or hex str values are equal- Type
- boolean
-
getRgba() → {null|Array.<number>}
-
Gets color as RGBA array.
- Source:
- fill/color.js, line 35
Returns:
RGBA array.- Type
- null | Array.<number>
-
modifyColor(mode, value) → {lime.fill.Color}
-
Modify color value
Parameters:
Name Type Description mode
number Settings to change. value
number Amount factor. - Source:
- fill/color.js, line 68
Returns:
object itself.- Type
- lime.fill.Color
-
setCanvasStyle()
-
- Source:
- fill/color.js, line 131
-
setColor(clr) → {lime.fill.Color}
-
Set color value of the object. Accepts raw RGB(A) values and strings.
Parameters:
Name Type Description clr
* New color value. - Source:
- fill/color.js, line 99
Returns:
object itself.- Type
- lime.fill.Color
-
setDOMStyle()
-
- Source:
- fill/color.js, line 126