Color Converter
Convert between HEX, RGB, and HSL color formats. Pick any color visually, adjust with sliders, and copy CSS values with one click.
Understanding Color Formats
Every color on screen can be described using different notations. Designers and developers work with three main formats: HEX, RGB, and HSL. They all represent the same colors — they're just different languages for the same thing.
HEX Colors
HEX is a compact six-character code preceded by a hash symbol. Each pair of characters represents the red, green, and blue channels in hexadecimal (base-16) notation, with values from 00 (none) to FF (maximum).
#FF5733 → R:255, G:87, B:51
3B = 59, 82 = 130, F6 = 246 → rgb(59, 130, 246)
RGB Colors
RGB defines color using three values from 0 to 255 — one for each light channel (red, green, blue). Mixing all three at full intensity gives white; all at zero gives black. This model directly mirrors how screens produce color by combining light.
Values: 0–255 each
HSL Colors
HSL is often the most intuitive format for humans. Hue is the color itself (a position on the color wheel, 0–360°). Saturation is how vivid the color is (0% = gray, 100% = full color). Lightness controls brightness (0% = black, 50% = pure color, 100% = white).
H: 0–360° · S: 0–100% · L: 0–100%
Desaturated red = hsl(0, 40%, 50%)
Light pastel red = hsl(0, 100%, 85%)
Common Web Colors
Here are some frequently used colors for quick reference. Click any swatch to load it into the converter.
Frequently Asked Questions
Split the 6-character hex code into three pairs (RR, GG, BB) and convert each from hexadecimal to decimal. For example, #FF5733: FF=255, 57=87, 33=51 → rgb(255, 87, 51).
Convert each RGB value (0–255) to a two-digit hex number. For rgb(59, 130, 246): 59=3B, 130=82, 246=F6 → #3B82F6.
HSL stands for Hue (color angle 0–360°), Saturation (intensity 0–100%), and Lightness (brightness 0–100%). It's more intuitive than RGB because you can easily adjust how vivid or bright a color is without changing the base hue.
They're three different notations for the same colors. HEX is compact (#FF5733). RGB is explicit with light values (0–255 per channel). HSL is human-friendly with hue/saturation/lightness. All work in CSS.
All three work. HEX is most common for static colors. HSL is best for design systems where you adjust lightness/saturation programmatically. RGB is useful when doing color math. Pick whichever fits your workflow.
Yes. Copy the HEX or RGB value from this converter and paste it directly into Figma, Canva, Sketch, Photoshop, or any design tool's color input field.