Discord Embed Color: Convert Hex to Decimal
Discord embeds want a decimal color, not a hex code. Learn why, how to convert #0066FF by hand, and the fastest way to get the right number.
You copied a hex color from your brand guide, pasted it into an embed's color field, and Discord either errored or showed the wrong shade. The reason: the API expects the color as a decimal integer.
Why decimal
A hex color like #0066FF is just a base-16 number. Discord's API wants the same number written in base 10. #0066FF becomes 26367.
Convert by hand
Drop the #, then read the value as a hexadecimal number. For 0066FF:
00is 0, which contributes 066is 102, which contributes 102 × 256 = 26,112FFis 255, which contributes 255
Add them up: 26,112 + 255 = 26,367.
Convert in one step
Paste your hex code into the free Hex to Decimal tool and copy the result.
Use it in an embed
{ "embeds": [{ "title": "Welcome", "color": 26367 }] }
Preview the result before posting with the Discord Embed Builder, which shows the color live.
Tips
- Colors in the visual builder usually take hex, so you only need decimals when writing JSON by hand.
- Keep a short list of your brand's decimals so every announcement matches.
Prefer to skip JSON entirely? Build your bot's messages visually in ServaDiscord.
