Hex is 3 or 6 characters, for example #414df2.
The number for the Discord API
4279794
Enter a valid hex
Discord reads 0 as no colour. For black use #000001, which is 1.
- Hex
#414DF2 - RGB
65, 77, 242
A name with this role
Contrast with the background: 2.1:1
Contrast with the background: 5.9:1
How to use it in three steps
Step by step, with this page's example.
- 01
Pick a color or type a hex code.
- 02
Read the decimal number.
- 03
Paste it into the color field in the API or an embed.
#414df2
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.