New update
This is your color as the embed border.
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.
#5865F2
5793266
5793266#5865F20x5865F2rgb(88, 101, 242)hsl(235, 86%, 65%)JSON (Webhook / API): "color": 5793266discord.js: .setColor(0x5865F2)discord.py: discord.Color(0x5865F2)JDA / Java: .setColor(0x5865F2)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
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.
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.
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.
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.
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.