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
Name | Type | Required | Description |
---|---|---|---|
rgbColour | string | Yes | The RGB colour value to be converted |
validated | boolean | No (default=false) | Has the value already been validated as an RGB colour? If so, skip validating it again |