<static> valueToColor(value, out) → {object}
Converts a value - a "hex" string, a "CSS 'web' string", or a number - into red, green, blue, and alpha components.
The value can be a string (see hexToColor
and webToColor
for the supported formats) or a packed integer (see getRGB
).
An alpha channel is not supported when specifying a hex string.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
value | string | number | The color expressed as a recognized string format or a packed integer. | |
out | object | <optional> | The object to use for the output. If not provided a new object will be created. |
Returns
object -
The (out
) object with the red, green, blue, and alpha values set as the r/g/b/a properties.
- Source code: utils/Color.js (Line 641)
Please login to continue.