Skip to content

Instantly share code, notes, and snippets.

@thomasbnt
Last active November 22, 2024 18:46
Show Gist options
  • Save thomasbnt/b6f455e2c7d743b796917fa3c205f812 to your computer and use it in GitHub Desktop.
Save thomasbnt/b6f455e2c7d743b796917fa3c205f812 to your computer and use it in GitHub Desktop.
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name. To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.

Name Int value Hex Code
Default 0 #000000
Aqua 1752220 #1ABC9C
DarkAqua 1146986 #11806A
Green 5763719 #57F287
DarkGreen 2067276 #1F8B4C
Blue 3447003 #3498DB
DarkBlue 2123412 #206694
Purple 10181046 #9B59B6
DarkPurple 7419530 #71368A
LuminousVividPink 15277667 #E91E63
DarkVividPink 11342935 #AD1457
Gold 15844367 #F1C40F
DarkGold 12745742 #C27C0E
Orange 15105570 #E67E22
DarkOrange 11027200 #A84300
Red 15548997 #ED4245
DarkRed 10038562 #992D22
Grey 9807270 #95A5A6
DarkGrey 9936031 #979C9F
DarkerGrey 8359053 #7F8C8D
LightGrey 12370112 #BCC0C0
Navy 3426654 #34495E
DarkNavy 2899536 #2C3E50
Yellow 16776960 #FFFF00

Official Discord color palette

Name Int value Hex Code
White (Default) 16777215 #FFFFFF
Greyple 10070709 #99AAb5
Black 2303786 #23272A
DarkButNotBlack 2895667 #2C2F33
NotQuiteBlack 2303786 #23272A
Blurple 5793266 #5865F2
Green 5763719 #57F287
Yellow 16705372 #FEE75C
Fuchsia 15418782 #EB459E
Red 15548997 #ED4245

Other role colors

Name Int value Hex Code
Unnamed role color 1 6323595 #607D8B
Unnamed role color 2 5533306 #546E7A
Background black color 3553599 #36393F

Unnamed colors


✨ Don't hesitate to follow me on GitHub, also sponsoring me on GitHub.

Sponsors are people who support the development of this project. If you want to support me, you can do it by clicking on the button below.

GitHub Sponsors

Sponsors

@thomasbnt
Copy link
Author

Of course, any color can be used. Thanks @Blessedwasnotfat for your message 🕺☕

@Starkiller4011
Copy link

Starkiller4011 commented Jan 14, 2021

Has anyone managed to get a proper white? I tried using #FFFFFF as well as rgb(255, 255, 255) and what I end up getting on my embeds is a weird grey. If I use #FFFFFD, rgb(255, 255, 253), I get an off-white but for some reason #FFFFFF gives grey lol

@decabitrunner
Copy link

It is so helpful thanks

@real2two
Copy link

real2two commented Mar 1, 2021

Has anyone managed to get a proper white? I tried using #FFFFFF as well as rgb(255, 255, 255) and what I end up getting on my embeds is a weird grey. If I use #FFFFFD, rgb(255, 255, 253), I get an off-white but for some reason #FFFFFF gives grey lol

same thing happening to me now

EDIT: 16777214 seems to work.

@Olympic1
Copy link

Olympic1 commented Mar 7, 2021

Here is an updated list of the colors that are currently implemented with a name

Name Int value Hex Code
DEFAULT 0 #000000
AQUA 1752220 #1ABC9C
DARK_AQUA 1146986 #11806A
GREEN 3066993 #2ECC71
DARK_GREEN 2067276 #1F8B4C
BLUE 3447003 #3498DB
DARK_BLUE 2123412 #206694
PURPLE 10181046 #9B59B6
DARK_PURPLE 7419530 #71368A
LUMINOUS_VIVID_PINK 15277667 #E91E63
DARK_VIVID_PINK 11342935 #AD1457
GOLD 15844367 #F1C40F
DARK_GOLD 12745742 #C27C0E
ORANGE 15105570 #E67E22
DARK_ORANGE 11027200 #A84300
RED 15158332 #E74C3C
DARK_RED 10038562 #992D22
GREY 9807270 #95A5A6
DARK_GREY 9936031 #979C9F
DARKER_GREY 8359053 #7F8C8D
LIGHT_GREY 12370112 #BCC0C0
NAVY 3426654 #34495E
DARK_NAVY 2899536 #2C3E50
YELLOW 16776960 #FFFF00

Official Discord color palette

Name Int value Hex Code
WHITE 16777215 #FFFFFF
BLURPLE 7506394 #7289DA
GREYPLE (Default) 10070709 #99AAB5
DARK_BUT_NOT_BLACK 2895667 #2C2F33
NOT_QUITE_BLACK 2303786 #23272A

Other role colors

Name Int value Hex Code
Unnamed role color 1 6323595 #607D8B
Unnamed role color 2 5533306 #546E7A

Unnamed colors

@thomasbnt
Copy link
Author

Thanks @Olympic1, I updated the file !

@SynergyBest
Copy link

life saver, thank you so much!

@Tomtom-Skywalker
Copy link

If This Is Still Being Maintained The Embed Its Self's Colour (The Part Where The Txt Goes) is #2F3136 the RGB 47,49,54 Name Is Unknown

@typedwaves
Copy link

Embed Color: #2F3136 (Useful if you want embeds without the color)

@thomasbnt
Copy link
Author

Embed Color: #2F3136 (Useful if you want embeds without the color)

@Starnamics yeep pretty nice embed !

@nlssn
Copy link

nlssn commented Jun 7, 2021

Here are the colors from the new branding guidelines announced on May 14th 2021.
The new color called "Blurple" has replaced #7289DA (which is now referred to as "OG Blurple").

Name                             | Int value | Hex code
---------------------------------|-----------|----------
`BLURPLE`                        | 5793266   | `#5865F2`
`GREEN`                          | 5763719   | `#57F287`
`YELLOW`                         | 16705372  | `#FEE75C`
`FUSCHIA`                        | 15418782  | `#EB459E`
`RED`                            | 15548997  | `#ED4245`
`WHITE`                          | 16777215  | `#FFFFFF`
`BLACK`                          | 2303786   | `#23272A`

@Resoki
Copy link

Resoki commented Oct 13, 2021

You can use 'RANDOM' too ;)

@thomasbnt
Copy link
Author

thomasbnt commented Oct 13, 2021

You can use 'RANDOM' too ;)

Yep of course!

Updated file, thanks ;)

Copy link

ghost commented Jan 22, 2022

tysm

@phil-flip
Copy link

phil-flip commented Sep 1, 2022

Hey. I thought I just let you know that colors in Discord.JS v14 have changed to lowercase.
So ex. "GREEN" becomes "Green" or "ORANGE" is now "Orange".

After testing around, unfortunately all colors need to be changed as sometimes it doesn't work, or it will use a different color... Which is kinda strange to happen.

@insomnia-creator
Copy link

that's just inconvenient, this was a useless change.

@phil-flip
Copy link

IK... the whole v14 update is unnecessary. Changed many things that they also just could leave untouched. This also made parts of the documentation completely unreadable and difficult to understand. I'm not even using it anymore and just go straight to the guide or the upgrade page from v13 to 14

@thomasbnt
Copy link
Author

IK... the whole v14 update is unnecessary. Changed many things that they also just could leave untouched. This also made parts of the documentation completely unreadable and difficult to understand. I'm not even using it anymore and just go straight to the guide or the upgrade page from v13 to 14

@FlipperLP And I thank those who made the migration guides! 😄

@phil-flip
Copy link

IK... the whole v14 update is unnecessary. Changed many things that they also just could leave untouched. This also made parts of the documentation completely unreadable and difficult to understand. I'm not even using it anymore and just go straight to the guide or the upgrade page from v13 to 14

@FlipperLP And I thank those who made the migration guides! 😄

Yea most defiantly! But I think it's also those that are making the upgrades themselves.

@thomasbnt
Copy link
Author

thomasbnt commented Sep 1, 2022

This Gist was updated due to the release of Discord.js v14 😄🌱

@phil-flip
Copy link

Nice! Thank you ^^

@ERICA-04
Copy link

You can use 'RANDOM' too ;)

hot to use the random? i kept gettin and error -- TypeError [ColorConvert]: Unable to convert color to a number.

@Resoki
Copy link

Resoki commented Sep 24, 2022

You can use 'RANDOM' too ;)

hot to use the random? i kept gettin and error -- TypeError [ColorConvert]: Unable to convert color to a number.

Because Its DJS14 now ^^

@thomasbnt
Copy link
Author

You can use 'RANDOM' too ;)

hot to use the random? i kept gettin and error -- TypeError [ColorConvert]: Unable to convert color to a number.

Because Its DJS14 now ^^

Yes @Resoki, random was removed. Thanks for tell me this modification.
@ERICA-04 you can create a function to have a random color in your embeds messages.

@insomnia-creator
Copy link

Why was 'RANDOM' removed? Any idea?

@thomasbnt
Copy link
Author

Why was 'RANDOM' removed? Any idea?

RANDOM was a good idea but d.js maintainers really like changing all good choices.

@sirlupusdev
Copy link

As a note:
If you use discord.js' Embed Builder (and not @discordjs/builder), you're actually able to use hex colors, colour names or rgb values. However, the names are not completely uppercase anymore, just capitalised (for example, Random instead of RANDOM).

Source: https://discord.js.org/#/docs/discord.js/main/class/EmbedBuilder
ColorResolvable and List of Colours: https://discord.js.org/#/docs/discord.js/main/typedef/ColorResolvable

@HEPOSHEIKKI
Copy link

Does anyone happen to know where I could find an article or such about using what logic exactly are the colors converted to an int?

Cheers!

@thomasbnt
Copy link
Author

thomasbnt commented Sep 14, 2023

Does anyone happen to know where I could find an article or such about using what logic exactly are the colors converted to an int?

Cheers!

Hello @HEPOSHEIKKI ! You can see this page about logic and converting hexa to int or also this page "Hexadecimal to Decimal Converter"

@HEPOSHEIKKI
Copy link

Does anyone happen to know where I could find an article or such about using what logic exactly are the colors converted to an int?
Cheers!

Hello @HEPOSHEIKKI ! You can see this page about logic and converting hexa to int or also this page "Hexadecimal to Decimal Converter"

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment