Hex to RGB Converter
Convert a hex colour to RGB and HSL with a live swatch and a shades strip. Accepts 3- or 6-digit hex, with or without the #.
Convert a hex colour to RGB and HSL with a live swatch and a shades strip. Accepts 3- or 6-digit hex, with or without the #.
A hex colour is just three pairs of hexadecimal digits — one each for red, green and blue. To convert hex to RGB, split the code into those pairs and read each as a number from 0 to 255. For #2563EB that is 25 → 37 (red), 63 → 99 (green) and EB → 235 (blue), giving rgb(37, 99, 235). This converter does it as you type and shows a live swatch, the matching HSL value, and the individual R, G and B channels.
Short three-digit hex codes work too: each digit is doubled, so #F0A is the same as #FF00AA. The leading # is optional — paste with or without it.
| Hex | RGB | Name |
|---|---|---|
| #000000 | rgb(0, 0, 0) | Black |
| #FFFFFF | rgb(255, 255, 255) | White |
| #FF0000 | rgb(255, 0, 0) | Red |
| #00FF00 | rgb(0, 255, 0) | Green |
| #2563EB | rgb(37, 99, 235) | Blue |
| #808080 | rgb(128, 128, 128) | Gray |
The same colour is shown three ways. RGB is what screens use directly. HSL (hue, saturation, lightness) is friendlier for tweaking — nudging the lightness gives you a tint or a shade without changing the hue. The five-swatch strip below the channels does exactly that: it blends your colour toward white on the left and toward black on the right, a quick way to build a palette around one base colour.
#2563EB is rgb(37, 99, 235) — red 37, green 99, blue 235. Each pair of hex digits is read as a value from 0 to 255.
Yes. A 3-digit code like #F0A is expanded by doubling each digit, so it becomes #FF00AA before conversion. The # is optional in either form.
The hex is first turned into RGB, then RGB is converted to hue, saturation and lightness. HSL describes the same colour in a way that is easier to adjust by eye.
It blends your colour toward white (lighter, on the left) and toward black (darker, on the right), giving a quick five-step palette built from a single base colour.
People reach this tool searching for: