Skip to main content

Random Color

This command generates and displays information about a random color.

Trigger

Type: Regex
Trigger: \A(-|<@!?204255221017214977>\s*)(rand(om)?-?color)(\s+|\z)

Usage

  • -randcolor - Generates a random color.
Aliases

Instead of randcolor, you can also use randomcolor, random-color, or rand-color.

Code

{{/*
Displays a random color.
See <https://yagpdb-cc.github.io/utilities/random-color> for more information.

Author: jo3-l <https://github.com/jo3-l>
*/}}

{{ $dec := randInt 0 16777216 }}
{{ $hex := printf "%06x" $dec }}
{{ sendMessage nil (cembed
"title" "❯ Random Color"
"color" $dec
"description" (printf "❯ **Decimal:** %d\n❯ **Hex:** #%s" $dec $hex)
"thumbnail" (sdict "url" (printf "https://dummyimage.com/400x400/%s/%s" $hex $hex))
) }}

Author

This custom command was written by @jo3-l.