Polotno

Color converter

HEX to RGB converter

Paste a hex code, get RGB plus copy-ready CSS rgb() and hsl() values, a live swatch, and a contrast check. Free, no signup, fully client-side.

Quick answer

Read each hex pair in base 16: #1DB954 is 29, 185, 84.

Formula: #RRGGBB → R = 0xRR, G = 0xGG, B = 0xBB

#1DB954
RGB

Contrast: 2.59:1 on white, 8.12:1 on black. Passes WCAG AA for body text on the better background.

Common colors

The math, in one line

A hex color is three bytes written in base 16: two digits for red, two for green, two for blue, each covering 0 to 255. Converting to RGB is just reading those pairs in base 10. #1DB954 splits into 1D, B9, 54, which is 29, 185, 84.

Common values

HEXRGBColor
#FFFFFF255, 255, 255White
#0000000, 0, 0Black
#FF0000255, 0, 0Red
#00FF000, 255, 0Green
#0000FF0, 0, 255Blue
#3B82F659, 130, 246Tailwind blue-500
#1DB95429, 185, 84Spotify green

Going to print instead?

Hex and RGB both describe light on a screen. Ink needs CMYK, and the conversion is not arithmetic: it depends on paper and press. Use the HEX to CMYK converter, which runs a real ICC profile engine, rather than a formula.

Frequently asked questions

Q: How do I convert HEX to RGB?

Split the six hex digits into three pairs and read each pair as a base-16 number. #1DB954 becomes 1D = 29, B9 = 185, 54 = 84, so the RGB value is 29, 185, 84. Paste any hex code above to get the values plus copy-ready CSS.

Q: What is #FFFFFF in RGB?

#FFFFFF is 255, 255, 255 (white). #000000 is 0, 0, 0 (black). Each pair of hex digits covers the 0 to 255 range for one channel: FF is the maximum, 00 the minimum.

Q: What does a 3-digit hex code mean?

Shorthand. Each digit is doubled, so #1B9 expands to #11BB99. The converter accepts both forms, with or without the leading #.

Q: Should I use hex or rgb() in CSS?

Both render identically. Hex is more compact and common in design handoffs; rgb() is easier to manipulate programmatically and required if you want to set alpha with rgb(r g b / 50%). This tool outputs both.

Q: Is HEX the same as RGB?

Yes, they describe the same sRGB color in different notation. Hex writes each channel in base 16, RGB writes it in base 10. Neither is suitable for print, where you need CMYK.

Want this in your app? Embed Polotno SDK.

TRUSTED BY

100,000+

CREATORS

300+

BUSINESSES

ExpediaUnbounceLovePopPostGridPredis.ai