UtilitiesTools

HEX to RGB Converter

Paste a HEX, RGB, or HSL value into one box and the other two formats appear at once. With this converter you edit any format and the other two update in real time, alongside a big live preview and the color's nearest real name. Copy any value with one tap — nothing you type ever leaves your browser.

Nearest name

🔒 Converted in your browser. Nothing is uploaded or stored.

What is the HEX to RGB converter?

This is a live HEX to RGB converter that also handles HSL — all in a single, two-way view. You type a color in any one of the three formats and the other two update instantly, so you never have to switch tools or do hex math in your head. Edit the HEX field and the RGB and HSL values follow; edit RGB and the HEX value follows. On top of the raw numbers, the tool shows you the color's nearest real name (like "Dodger Blue") and a large preview swatch, so a string of digits suddenly becomes a color you can recognize.

How to use it

  1. Type or paste a value into any field — a HEX code such as #1E90FF (3- or 6-digit, with or without the #), an RGB triple, or HSL.
  2. Watch the other two formats update in real time, along with the big swatch preview.
  3. Read the nearest color name and its family below the swatch, plus a couple of close alternatives.
  4. Tap any copy button to grab the exact #hex, rgb(r, g, b), or hsl(h, s%, l%) string for your CSS or design file. Then you're done — no sign-up, nothing to install.

The method behind it

A 6-digit HEX color is three pairs of hexadecimal digits, one each for red, green, and blue. To convert HEX to RGB, split it into those three pairs and convert each from base 16 to base 10, giving a value from 0 to 255. For example, 1E is 30, 90 is 144, and FF is 255, so #1E90FF becomes rgb(30, 144, 255). Going the other way (RGB to HEX), each channel is converted back to a 2-digit hexadecimal number and joined. HSL is derived from the same RGB values: hue is the angle on the color wheel (0–360°), saturation is the color's intensity, and lightness is how light or dark it is. The color name is found by converting your color into the perceptually uniform CIELAB space and measuring the ΔE distance to a curated list of about 4,930 named colors — the closest one wins.

Examples

HEX / RGB / HSL reference table

ColorHEXRGBHSL
Black#000000rgb(0, 0, 0)hsl(0, 0%, 0%)
White#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)
Red#FF0000rgb(255, 0, 0)hsl(0, 100%, 50%)
Lime#00FF00rgb(0, 255, 0)hsl(120, 100%, 50%)
Blue#0000FFrgb(0, 0, 255)hsl(240, 100%, 50%)
Dodger Blue#1E90FFrgb(30, 144, 255)hsl(210, 100%, 56%)
Coral#FF6F61rgb(255, 111, 97)hsl(5, 100%, 69%)
Gray#808080rgb(128, 128, 128)hsl(0, 0%, 50%)

Common use cases

Why use this one

Most "hex to rgb" tools give you two formats and stop there. This one syncs HEX, RGB, and HSL together in a single bidirectional page — edit any format and the other two update in real time — so it doubles as an rgb-to-hex and hex-to-hsl tool without sending you to another page. It's the only one in this set that also tells you the color's nearest real name and family, runs entirely in your browser (your color never leaves the page, no account needed), and stays fast and mobile-friendly so you get the answer in a second and move on. When you want the full name match, head to the Color Namer; to lift a color straight out of a picture, try the Color Picker from Image.

Frequently asked questions

How do I convert a HEX color to RGB?

A 6-digit HEX code is just three 2-digit hexadecimal numbers — one each for red, green, and blue. Convert each pair from base 16 to base 10 to get a value from 0 to 255. For example #1E90FF is R=30, G=144, B=255. Paste any HEX into the converter above and the RGB (and HSL) values appear instantly.

Can this convert RGB back to HEX too?

Yes. This is a single two-way tool: edit the RGB (or HSL) fields and the HEX value updates live, exactly as it does in the other direction. You do not need a separate 'rgb to hex' page — every field stays in sync.

What is the difference between HEX, RGB, and HSL?

They describe the same color three ways. HEX (#RRGGBB) is a compact hexadecimal form used in CSS and design tools. RGB lists the red, green, and blue channels as 0-255 numbers. HSL describes the color by Hue, Saturation, and Lightness, which is more intuitive when you want to lighten, darken, or shift a hue. This tool shows all three at once.

Why does it also show a color name?

Numbers like #1E90FF do not tell you what the color looks like. We match your color to the nearest entry in a curated list of ~4930 named colors using a perceptual CIELAB distance, so you instantly know it is roughly 'Dodger Blue' (or its closest relatives). It is a quick sanity check and a handy naming aid for design specs.

Is my color data sent to a server?

No. All conversion and color-name matching run entirely in your browser using local JavaScript. Nothing you type is uploaded, logged, or stored — it works the same offline once the page has loaded.

Related tools