rgbToHex()

Overview

public string function rgbToHex(
      required string  rgbColour
    ,          boolean validated = false
)

Converts an RGB colour value to hex.

Throws SimpleColourPicker.invalidRgbColour error if the input value is not a valid RGB colour.

Arguments

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