DWEEB
Tool + reference · Colors

Discord Color Codes: Embed, Role and Brand Colors

Discord stores every color as one number: an embed's color, a Components V2 container's accent and a role's color are all 0xRRGGBB integers, and a webhook's JSON needs them in decimal. Convert any color below, then copy Discord's own brand and role colors and the named colors discord.js and discord.py ship.

Discord color converter

Paste a color in any form — #5865F2, 0x5865F2, 5793266 or rgb(88, 101, 242) — or pick one, and copy it in the form you need. Discord's JSON takes the decimal number.

Blurple, Discord's brand color.

The chosen color in each format Discord and its libraries use
FormatValueWhere it goesCopy
Decimal5793266JSON: an embed's color, a container's accent_color
Hex#5865F2Discord's role color field, design tools, CSS
Code literal0x5865F2discord.js, discord.py and most languages
RGBrgb(88, 101, 242)Image editors and CSS
Your card's accentThis is the stripe an embed or a Components V2 container shows in this color.
Discord brand
2021 palette
Role colors

Why Discord wants a decimal color

A color is three bytes — red, green and blue — and Discord keeps it as the single number they make: red × 65,536 + green × 256 + blue. Blurple, #5865F2, is 88 × 65,536 + 101 × 256 + 242 = 5,793,266. Code can write the same number as the hex literal 0x5865F2, but JSON has no hex notation, so a webhook's body carries the decimal: in a classic embed's color field, and in a Components V2 container's accent_color.

Leave accent_color out for a container with no colored stripe. The two payloads below are separate messages, because a Components V2 message cannot also carry embeds.

{
  "embeds": [{ "title": "A classic embed", "color": 5793266 }]
}

{
  "flags": 32768,
  "components": [
    {
      "type": 17,
      "accent_color": 5793266,
      "components": [{ "type": 10, "content": "A Components V2 container" }]
    }
  ]
}

Discord's brand colors

Discord's branding page lists three colors today: Blurple, Light Blurple and Black. The brighter green, yellow, fuchsia and red of its 2021 palette are no longer on that page, but discord.js and discord.py still name them, so they turn up in bots everywhere. The blurple Discord used before its 2021 rebrand, #7289DA (7,506,394), survives as discord.py's og_blurple().

Discord's brand colors
ColorHexDecimalWhere it comes from
Blurple#5865F25793266Discord's branding page
Light Blurple#E0E3FF14738431Discord's branding page
Black#0000000Discord's branding page
Green#57F28757637192021 palette, still in discord.js / discord.py
Yellow#FEE75C167053722021 palette, still in discord.js / discord.py
Fuchsia#EB459E154187822021 palette, still in discord.js / discord.py
Red#ED4245155489972021 palette, still in discord.js / discord.py
Old blurple#7289DA7506394Before the 2021 rebrand

Discord role color presets

The role color picker in Server Settings offers twenty swatches: ten colors and a darker shade of each. Discord shows them without names, so the names here are only descriptive. A role with no color of its own is stored as 0 and shows as #99AAB5 (10,070,709), and any hex code works if none of the presets fits.

Discord role color presets
SwatchHexDecimal
Teal#1ABC9C1752220
Green#2ECC713066993
Blue#3498DB3447003
Purple#9B59B610181046
Magenta#E91E6315277667
Gold#F1C40F15844367
Orange#E67E2215105570
Red#E74C3C15158332
Light grey#95A5A69807270
Blue grey#607D8B6323595
Dark teal#11806A1146986
Dark green#1F8B4C2067276
Dark blue#2066942123412
Dark purple#71368A7419530
Dark magenta#AD145711342935
Dark gold#C27C0E12745742
Dark orange#A8430011027200
Dark red#992D2210038562
Grey#979C9F9936031
Dark blue grey#546E7A5533306
No color (default)#99AAB510070709

discord.js and discord.py color names

Both libraries ship named colors, and they disagree in places that bite: discord.js Colors.Green is the bright 2021 brand green #57F287 while discord.py's Colour.green() is the role picker's #2ECC71, discord.js Red is #ED4245 against discord.py red()'s #E74C3C, and each library's grey names point at different shades. Match on the hex, not the name. discord.py also offers the app's theme backgrounds (ash_theme(), dark_theme() and so on); they are background shades rather than accents, so they are not listed here.

discord.js and discord.py color names
HexDecimaldiscord.js Colorsdiscord.py Colour
#5865F25793266Blurpleblurple()
#7289DA7506394—og_blurple()
#57F2875763719Greenbrand_green()
#ED424515548997Redbrand_red()
#FEE75C16705372Yellowyellow()
#EB459E15418782Fuchsiafuchsia()
#EB459F15418783—pink()
#1ABC9C1752220Aquateal()
#11806A1146986DarkAquadark_teal()
#2ECC713066993—green()
#1F8B4C2067276DarkGreendark_green()
#3498DB3447003Blueblue()
#2066942123412DarkBluedark_blue()
#9B59B610181046Purplepurple()
#71368A7419530DarkPurpledark_purple()
#E91E6315277667LuminousVividPinkmagenta()
#AD145711342935DarkVividPinkdark_magenta()
#F1C40F15844367Goldgold()
#C27C0E12745742DarkGolddark_gold()
#E67E2215105570Orangeorange()
#A8430011027200DarkOrangedark_orange()
#E74C3C15158332—red()
#992D2210038562DarkReddark_red()
#95A5A69807270Greylighter_grey()
#979C9F9936031DarkGreylight_grey()
#607D8B6323595—dark_grey()
#546E7A5533306—darker_grey()
#7F8C8D8359053DarkerGrey—
#BCC0C012370112LightGrey—
#99AAB510070709Greyplegreyple()
#34495E3426654Navy—
#2C3E502899536DarkNavy—
#2C2F332895667DarkButNotBlack—
#23272A2303786NotQuiteBlack—
#FFFFFF16777215White—
#0000000Defaultdefault()

Convert between hex and decimal in code

Every language that talks to Discord can do the conversion in one call, and both libraries also accept the literal directly.

// JavaScript
parseInt("5865F2", 16);       // 5793266
(5793266).toString(16);       // "5865f2"
0x5865f2;                     // 5793266

# Python
int("5865F2", 16)             # 5793266
f"{5793266:06X}"              # '5865F2'
0x5865F2                      # 5793266

Picking an accent color that works

Accent colors are a Container setting in the Components V2 guide, and the embed builder shows how a classic embed's color carries over when you convert it.

  • The stripe is narrow, so saturated colors read best. Very pale ones such as Light Blurple almost vanish on the Light theme, and very dark ones on Dark and Onyx.
  • Keep one color per purpose — rules, announcements, alerts — so members learn what a stripe means at a glance.
  • Color is a cue, not the message: say it in the text as well, for readers who cannot tell the colors apart.
  • To color the words themselves, use an ansi code block — the colored text generator writes one for you.

Frequently asked questions

What is Discord's blurple hex code?

#5865F2, which is 5793266 in decimal and 0x5865F2 in code. The blurple Discord used before its 2021 rebrand was #7289DA (7506394).

How do I set an embed color in a Discord webhook?

Send the color as a decimal number: in a classic embed's color field, or in a Components V2 container's accent_color — 5793266 for blurple. JSON has no hex notation, so write the number rather than "#5865F2".

How do I convert a hex color to decimal for Discord?

Paste it into the converter on this page, or work it out as red × 65,536 + green × 256 + blue. In code, parseInt("5865F2", 16) in JavaScript or int("5865F2", 16) in Python does it.

What are Discord's default role colors?

The role color picker offers twenty presets — ten colors and a darker shade of each — listed in the table above. A role with no color of its own shows as #99AAB5.

Why does discord.js Green look different from discord.py green?

They are different colors. discord.js Colors.Green is Discord's 2021 brand green #57F287, while discord.py's Colour.green() is the role picker's #2ECC71; discord.py calls the brand one brand_green(). Red differs the same way.

Put the guide into practice

Open the exact workflow in DWEEB. Nothing posts until you review and confirm it.

Build a card in your color →

Primary sources

Keep learning