Skip to content

$isValidColor

$isValidColor will check if a given color is valid, based on regex.

Usage

$isValidColor[color]

Parameters

FieldTypeDescriptionRequired
colorstringThe color you want to check, can be hex or decimal.true

Example(s)

This will check if the given color ff0000 is valid:

1
client.command({
2
name: "isValidColor",
3
code: `
4
$isValidColor[ff0000]` // returns: true
5
});