parseColor(color: any, alpha = 1, outputHex = false): string
This method will attempt to convert colours into their Hex or RGB equivalent . Eg "Red" will become "#FF0000"
The method accepts the following argument
The verbose color or Hex or RGB
The alpha value for the color
Do you want the return to be Hex (true) or RGBA (false)
Returns a Hex or RGBA string of the new colour
Last updated 3 years ago
Was this helpful?