Skip to content

$resolveColor

$resolveColor will convert a given color to a given type.

Usage

$resolveColor[type;returnAs?;...data]

Parameters

FieldTypeDescriptionRequired
typestringWhich type the input is.true
returnAs?stringAs what the color will be returned.false
…datastringThe data of the RGB or decimal color data.true

Types

TypesReturns
RGBred, green, blue50, 168, 82
decimalhex color#32a852
numberhexadecimal color80

Example(s)

This will return #32a852 as 50, 168, 82 is the RGB value of it:

1
client.command({
2
name: "resolveColor",
3
code: `
4
$resolveColor[rgb;decimal;50;168;82]
5
`
6
});

This will return 50, 168, 82 as #32a852 is the hex color of it:

1
client.command({
2
name: "resolveColor",
3
code: `
4
$resolveColor[decimal;rgb;#32a852]
5
`
6
});

This will return 3319890 as #32a852 is the hex color of it:

1
client.command({
2
name: "resolveColor",
3
code: `
4
$resolveColor[decimal;number;#32a852]
5
`
6
});