Constructor
new PureWebColor(color)
Initializes a new instance of
PureWebColor
.
Parameters:
Name | Type | Description |
---|---|---|
color |
number | The color. |
Method Detail
getAlpha() → {number}
Returns the alpha component of this color.
getBlue() → {number}
Returns the blue component of this color.
getColor() → {number}
Returns a color as an unsigned integer.
getGreen() → {number}
Returns the green component of this color.
getRed() → {number}
Returns the red component of this color.
toRGBAString() → {string}
Returns this PureWeb color, expressed as a string formatted as rgba (red, green, blue, alpha).
toString() → {string}
Returns this PureWeb color, expressed as a hexadecimal triplet beginning with a hash.
<static> tryParse(value) → {pureweb.PureWebColor|null}
Tries to parse the provided string into a PureWeb color. Will return
null
if the attempt fails.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
value |
string |
<nullable> |
The string to parse. |