Skip to content
Utilities

Color Converter (HEX ↔ RGB ↔ HSL)

Enter any color in hex, rgb() or hsl() and instantly get every other format plus a live preview swatch. Handy for embed colors, roles and dashboard styling.

  • Free, no limits
  • No login
  • Runs in your browser
Tool
HEX#5865f2
RGBrgb(88, 101, 242)
HSLhsl(235, 86%, 65%)

About this tool

Discord embed colors, role colors and banner accents are expressed in hex, RGB or HSL depending on where you are editing. This tool converts between all three formats in real time and shows a live swatch.

Enter any valid color and instantly copy the hex, RGB or HSL version.

How to use

1

Type or paste a color in HEX, RGB or HSL.

2

The converter updates live as you type.

3

Copy any value and be on your way.

Why Discord wants a decimal colour

Discord's API stores colours as a single integer rather than a hex string. The conversion is direct: the six hex digits are a base-16 number, so #5865F2 becomes 5793266 in base 10. Role colours, embed colours and accent colours all use this form.

The integer packs three bytes - red, green and blue - into the low 24 bits. You can extract them arithmetically: red is the value shifted right 16 bits, green is shifted right 8 and masked to a byte, blue is the value masked to a byte. That is occasionally more convenient than string manipulation.

The value 0 is a special case. A role with colour 0 is not black - it means "no colour", and members with that role take the colour of their next-highest coloured role. To get an actually black role you need a value very close to zero but not zero, which is why #000001 is a common trick.

Role colours and how they resolve

A member's displayed name colour comes from their highest-positioned role that has a colour set, not from their highest role overall. A moderator role positioned above a colour role but with no colour of its own is skipped for display purposes.

This is why role ordering and role colouring are separate design decisions. If you want a role to confer permissions without changing anyone's name colour, leave its colour unset rather than trying to match it to something else.

Why color formats matter

Bot code usually expects hex or decimal integers. CSS and graphic design tools prefer RGB or HSL. Having all three side by side removes the friction of manual conversion, especially when you are tweaking embed colors across multiple bot commands.

How to pick an embed color

A strong embed color ties your bot's messages to your server brand. Discord blurple is #5865F2, green is #23A55A for success states, red is #F23F43 for errors, and yellow is #F0B232 for warnings. Sticking to a small palette keeps your messages consistent.

Frequently asked questions

What is the Discord blurple hex code?

Discord blurple is #5865F2, the primary brand color used across the app.

Try other relevant tools