Embed colors

Discord wants embed colors as a decimal number, designers hand you hex. Paste a color in any notation and copy the value you need – with a preview in Dark, Ash, Onyx and Light.

Runs entirely in your browser
Anything works: #5865F2, #abc, 0x5865F2, 5793266, rgb(88, 101, 242), hsl(235, 86%, 65%)
Aa

#5865F2

5793266

Decimal (for JSON / webhooks)
5793266
Hex
#5865F2
0x hex (for code)
0x5865F2
RGB
rgb(88, 101, 242)
HSL
hsl(235, 86%, 65%)
Code
JSON (Webhook / API): "color": 5793266
discord.js: .setColor(0x5865F2)
discord.py: discord.Color(0x5865F2)
JDA / Java: .setColor(0x5865F2)

For bot replies

Nice embed colors

Discord role color presets

Preview in all four themes

Role name
New update
This is your color as the embed border.
Dark3.7 : 1 · so-so
Role name
New update
This is your color as the embed border.
Ash2.7 : 1 · hard to read
Role name
New update
This is your color as the embed border.
Onyx4.5 : 1 · easy to read
Role name
New update
This is your color as the embed border.
Light4.4 : 1 · so-so

Role colors show up as text on the chat background. 4.5 : 1 or more reads well, 3 : 1 is still okay for bold names. More on role colors and gradients

How it works

  1. Enter a color – #5865F2, 0x5865F2, 5793266 or rgb(88, 101, 242) – or use the color picker.
  2. Copy the decimal value for JSON and webhooks ("color": 5793266) or the code for discord.js or discord.py.
  3. Check in the preview how the embed border and role name look in all four Discord themes.
  4. If you use it as a role color, aim for green contrast values.

FAQ

Why does Discord want the color as a number?

In webhook and API JSON, color is an integer: the hex value as a decimal number. #5865F2 becomes 5793266. Libraries like discord.js or discord.py also accept 0x5865F2 in code – plain JSON only takes the decimal.

How do I convert hex to decimal?

Read the hex value without # as a base-16 number: parseInt("5865F2", 16) gives 5793266. This tool does it both ways and understands RGB and HSL too.

Why can't I see my embed color?

Check that you sent the decimal number, not the hex string – Discord rejects "color": "#ff0000". Very dark colors also nearly vanish in the Dark and Onyx themes; the preview shows this.

How do I get a black role color?

For roles, color 0 means “no color” and Discord shows the default. Use #010101 (decimal 65793) instead – it looks black but counts as a color.

What does the contrast value mean?

It's the WCAG contrast ratio between the color and the chat background. 4.5 : 1 or more reads well, 3 : 1 is enough for bold names. Below that, many members struggle, especially on phones.