<static> webToColor(web, out) → {object}
Converts a CSS 'web' string into a Phaser Color object.
The web string can be in the format 'rgb(r,g,b)'
or 'rgba(r,g,b,a)'
where r/g/b are in the range [0..255] and a is in the range [0..1].
Parameters
Name | Type | Argument | Description |
---|---|---|---|
web | string | The color string in CSS 'web' format. | |
out | object | <optional> | An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. |
Returns
object -
An object with the red, green, blue and alpha values set in the r, g, b and a properties.
- Source code: utils/Color.js (Line 608)
Please login to continue.