Color Converter
Convert HEX, RGB & HSL with a live preview.
100% private — runs in your browser, nothing is uploaded.
#3b82f6rgb(59, 130, 246)hsl(217, 91%, 60%)How to use the Color Converter
- 1Enter or pick a color
Type a HEX code, or click the swatch to choose a color visually.
- 2Read the formats
See the equivalent HEX, RGB and HSL values side by side.
- 3Copy what you need
Use the copy button next to any format to grab the exact code.
- 4Iterate
Adjust the HEX value or picker to explore shades until you find the right one.
Examples
| Input | Output |
|---|---|
#3b82f6 | rgb(59, 130, 246) · hsl(217, 91%, 60%) |
#fff | rgb(255, 255, 255) · hsl(0, 0%, 100%) |
Free online color converter
This color converter translates a color between the three formats used across the web: HEX, RGB and HSL. Enter a HEX code or pick a color, and copy the exact value in whichever format your CSS, design tool or code needs.
The three color formats
- HEX — a hash followed by six hex digits, e.g.
#3b82f6. Compact and common in CSS. - RGB — red, green and blue from 0–255, e.g.
rgb(59, 130, 246). - HSL — hue, saturation and lightness, e.g.
hsl(217, 91%, 60%). Great for making a color lighter, darker or less saturated.
Why HSL is useful
HSL makes it easy to build color variations: keep the hue and saturation, then raise or lower the lightness for tints and shades. That is much harder to do by eye with raw HEX or RGB. Because the converter runs in your browser, it is instant, private and works offline.
Frequently Asked Questions
How do I convert HEX to RGB?
A HEX color splits into three pairs of hex digits for red, green and blue. Each pair converts to a number from 0 to 255. For example #3b82f6 is rgb(59, 130, 246). This tool does it instantly.
What is the difference between RGB and HSL?
RGB describes a color by mixing red, green and blue light. HSL describes the same color by hue (0–360°), saturation (%) and lightness (%), which many designers find more intuitive for tweaking shades.
Do 3-digit HEX codes work?
Yes. Shorthand HEX like #fff is expanded to #ffffff automatically, so both three- and six-digit codes are accepted.
Can I pick a color visually?
Yes. Click the color swatch to open your system color picker; the HEX, RGB and HSL values update as you choose.
Does it support alpha or transparency?
This converter works with solid colors (HEX, RGB and HSL). Alpha channels such as RGBA and HSLA are not included, so it focuses on the opaque color value.
Is my color data kept private?
Yes. Conversions happen entirely in your browser, so nothing is uploaded, and the tool works offline.
Related tools
Unit Converter
Convert length, weight, volume, area, speed & data.
Open tool NewTemperature Converter
Convert Celsius, Fahrenheit & Kelvin instantly.
Open tool NewCSV to JSON Converter
Convert CSV to JSON and JSON back to CSV.
Open tool NewEpoch / Unix Timestamp Converter
Convert Unix timestamps to dates and back.
Open tool