Skip to content

$isValidHex

$isValidHex will check if the given hex / decimal color is valid.

Usage

$isValidHex[colorResolver]

Parameters

FieldTypeDescriptionRequired
colorResolverstring, numberHex / decimal color string.true

Example(s)

This will return true as #30dbd8 is an valid hex color:

1
client.command({
2
name: "isValidHex",
3
code: `
4
$isValidHex[#30dbd8]
5
`
6
});

This will return true as well as 80 is an valid hexadecimal color:

1
client.command({
2
name: "isValidHex",
3
code: `
4
$isValidHex[80]
5
`
6
});