๐ŸŽจ Hex to RGB Converter

Convert hex color codes to RGB and HSL instantly. Live preview swatch. Reverse conversion: RGB back to hex. Supports 3 and 6 digit hex.

Hex โ†’ RGB & HSL Enter a hex color code
โ€”
RGB
โ€”
HSL
โ€”
R
โ€”
G
โ€”
B
โ€”
CSS HSL
โ€”
RGB โ†’ Hex Enter R, G, B values (0โ€“255)
โ€”
Hex
โ€”
HSL
โ€”

What is a hex color code?

A hex color code is a 6-digit (or 3-digit shorthand) hexadecimal representation of a color used in HTML and CSS. For example, #ff5733 represents a red-orange color. The first two digits are the red channel, the next two green, and the last two blue โ€” each ranging from 00 (0) to ff (255).

How do I convert hex to RGB?

Split the 6-digit hex into three pairs and convert each from base-16 to decimal. #ff5733 splits into ff=255, 57=87, 33=51, giving rgb(255, 87, 51). This tool does that instantly with a live preview.

What is HSL?

HSL stands for Hue, Saturation, Lightness. Hue is a degree on the color wheel (0โ€“360), saturation is a percentage (0% = grey, 100% = full color), and lightness is a percentage (0% = black, 100% = white). Many designers find HSL more intuitive than RGB for making colors lighter, darker or less saturated.

3-digit vs 6-digit hex

A 3-digit hex like #f53 is shorthand for #ff5533 โ€” each digit is simply doubled. This tool handles both formats automatically.

More tools from Useful Patch

๐Ÿ—œ๏ธ
CSS Minifier
Compress your CSS files, remove comments and whitespace.
โ†’
๐Ÿงพ
Invoice & PO to CSV
Extract data from supplier PDFs into clean spreadsheet format. From ยฃ199.
โ†’