Converters

HEX to RGB Converter

Turn hex color codes into RGB values.

Tints & shades
Alpha / opacity100%

Feeds the RGBA and 8-digit HEX outputs below. Leave at 100% for a fully opaque color.

More formats
RGB (0–1 normalized)
RGB (0%–100%)
RGBA
HEX (8-digit, with alpha)
HWB
Decimal integer
Android (0xAARRGGBB)
SwiftUI Color
Channel breakdown
ChannelDecimal (0–255)HexFraction (0–1)Percent
Contrast & luminance
Relative luminance
Contrast vs white
Contrast vs black

WCAG 2.1 contrast ratios for this color used as text. AA needs 4.5:1 (3:1 for large text); AAA needs 7:1.

Color harmonies
Complementary
Analogous
Triadic
Tetradic
Split complementary

Click any swatch to load it into the converter above.

This free HEX to RGB converter turns any hex color code into its red, green and blue values instantly. Type a hex code like #5e6ad2(or use the picker) and read the matching rgb() string, ready to paste into CSS. Both shorthand (#5e6) and full six-digit hex are accepted, with a clear message when the code can't be parsed.

Beyond plain RGB it exports every format you're likely to need: HSL, HSV, CMYK and the nearest CSS color name up top, plus normalized RGB (0–1), percentage RGB, RGBA, 8-digit HEX with alpha, HWB, the decimal integer, Android 0xAARRGGBB and SwiftUI values below. An alpha slider feeds the RGBA and hex-with-alpha outputs, a per-channel breakdown shows each component in decimal, hex, fraction and percent, and one click copies any value — or all of them at once.

It also goes further than a plain lookup: WCAG 2.1 contrast ratios against white and black (with AA/AAA pass badges) help you check readability, and the color-harmony swatches (complementary, analogous, triadic, tetradic and split-complementary) suggest matching colors you can load with a single click. Use the tints & shades strip for lighter and darker variants of the same hue.

Related tools