Omnibus
HEX#2a78d6
RGBrgb(42, 120, 214)
HSLhsl(213, 68%, 50%)
OKLCHoklch(0.575 0.163 255.5)
Hue213°
Saturation68%
Lightness50%
Alpha100%
On whiteFail
4.42:1
On blackAA
4.76:1

Shades & harmonies

Tints & shades

Complementary

Analogous

Triadic

Split-complementary

Tetradic

Pick from an image

RGB to HEX converter

Enter a RGB color in the field above and its HEX value updates instantly, alongside HEX, RGB, HSL and OKLCH — copy any of them with one click. RGB lists the red, green and blue channels from 0 to 255, matching how a screen mixes light — written as rgb(255 0 0) or the legacy rgb(255, 0, 0). HEX writes a color as #RRGGBB — two hexadecimal digits each for red, green and blue, with an optional alpha pair. It's the notation most CSS and design tools default to.

For example, rgb(255, 0, 0) in RGB is #ff0000 in HEX. Everything is computed in your browser with no upload, and you can drag the hue, saturation and lightness sliders — or use the eyedropper — to explore nearby colors.

Looking for something else? See all color tools.

Related color tools

RGB to HEX Converter — frequently asked questions

How do I convert RGB to HEX?
Type or paste your RGB value into the color field. The HEX equivalent appears immediately in the HEX row — click the copy icon to grab it. You can also use the color picker, the sliders, or the eyedropper.
Can I convert HEX back to RGB?
Yes — the tool always shows every format at once, so the RGB value is right there too. There's also a dedicated HEX to RGB page if you'd prefer to start from HEX.
Is anything uploaded to a server?
No. Every conversion runs in your browser with JavaScript — the color values never leave your device, and the tool keeps working offline once the page has loaded.
Is this really free?
Yes — no sign-up, no payment, no watermark. A single unobtrusive ad slot covers hosting.

All color tools

Spotted a bug or have a suggestion?

Found something broken, have an idea, or just want to say thanks about any of our tools? Every message reaches a real person.