Skip to content
Math & Text rgbToHex

$rgbToHex — Converts groups of three RGB values to a list of HEX colors.

Converts groups of three RGB values to a list of HEX colors.

Syntax

$rgbToHex[(allowShort);rgb]

Parameters

  • allowShort (Boolean, optional) — true to give #f00 when possible
  • rgb (String, required) — Values 0 to 255, by three

Return Value

  • String.

Usage

$rgbToHex[allowShort;rgb] → result

Example

$sendMessage[$rgbToHex[allowShort;rgb]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.