Discord role color

A Discord role color is stored as one decimal number. Pick a color or type a hex code and get the value for the API or an embed. Free, in your browser.

The number for the Discord API

4279794

  • Hex #414DF2
  • RGB 65, 77, 242

A name with this role

Moderator dark

Contrast with the background: 2.1:1

Moderator light

Contrast with the background: 5.9:1

How to use it in three steps

Step by step, with this page's example.

  1. 01

    Pick a color or type a hex code.

  2. 02

    Read the decimal number.

  3. 03

    Paste it into the color field in the API or an embed.

What you enter

#414df2

What you get
4279794

Questions

How do I change a role color on Discord?
Open Server Settings, Roles, pick the role and set the color on the Display tab. The number from this tool is only needed when you set the color through the API or a bot.
How do I convert a hex code to a color for the Discord API?
Type the hex code or pick a color. The tool gives the decimal number, for example #414df2 is 4279794, which you paste into the color field.
Why does the API want a number instead of hex?
Discord stores a color as one RGB integer. Hex #414df2 and 4279794 are the same value written two ways.
What does color 0 mean?
For a role, 0 means no color, so the name keeps the default. Pure black is 1.

Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.