hexToRgb()

Overview

public string function hexToRgb(
      required string  hexColour
    ,          boolean validated = false
)

Converts a hex colour value to RGB.

Throws SimpleColourPicker.invalidHexColour error if the input value is not a valid hex colour.

Arguments

NameTypeRequiredDescription
hexColourstringYesThe hex colour value to be converted
validatedbooleanNo (default=false)Has the value already been validated as a hex colour? If so, skip validating it again