parseColor

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

chevron-rightcolor: stringhashtag

The verbose color or Hex or RGB

chevron-rightalpha: number (defaults to 1)hashtag

The alpha value for the color

chevron-rightoutputHex: boolean (defaults to false)hashtag

Do you want the return to be Hex (true) or RGBA (false)

Returns a Hex or RGBA string of the new colour

Last updated

Was this helpful?