Echo.Sync.Color
Class Method Summary | |
---|---|
Public | adjust() Adjusts the value of the color's RGB values by the specified amounts, returning a new Color. |
Public | blend() Blends two colors together. |
Public | render() Renders a color to an element. |
Public | renderClear() Renders a color to an element, clearing any existing value. |
Public | renderFB() Renders the "foreground" and "background" color properties of a component to an element's "color" and "backgroundColor" properties. |
Public | toHex() Converts red/green/blue integer values to a 6 digit hexadecimal string, preceded by a sharp, e. |
color
- the color to adjust (a 24 bit hex value, e.g., #1a2b3c)r
- the amount to adjust the red value of the color (-255 to 255)g
- the amount to adjust the green value of the color (-255 to 255)b
- the amount to adjust the blue value of the color (-255 to 255)value1
(#Color)
- the first colorvalue2
(#Color)
- the second colorratio
(Number)
- the blend ratio, where 0 represents the first color, 1 the second color, and 0.5 an equal blend
between the first and second colorscolor
(#Color)
- the colorelement
(#Element)
- the target elementstyleAttribute
(String)
- the name of the style attribute, e.g., "color", "backgroundColor"color
(#Color)
- the colorelement
(#Element)
- the target elementstyleAttribute
(String)
- the name of the style attribute, e.g., "color", "backgroundColor"component
(Echo.Component)
- the componentthe
(Element)
- target elementred
(Number)
- the red value, 0-255green
(Number)
- the green value, 0-255blue
(Number)
- the blue value, 0-255