HEX to RGB Converter
Convert colours between HEX, RGB and HSL, with a live swatch preview.
rgb(66, 119, 216)hsl(219, 66%, 55%)100% private — everything runs in your browser and nothing is sent to a server.
Need this built into your own product?
We build web apps, APIs and integrations for startups and businesses — the same team that ships these free developer tools.
The HEX to RGB Converter translates colours between HEX, RGB and HSL formats and shows a live swatch. Type a value in any format and see the others update, so you can grab the exact code your CSS or design tool needs.
Why use this tool
HEX, RGB and HSL
Convert between all three common CSS colour formats at once.
Live swatch
See the colour update as you type any value.
Copy any format
Grab the HEX, RGB or HSL string with one click.
How to use it
Enter a colour
Type a HEX code, RGB values or an HSL value.
See it convert
The other formats and the swatch update instantly.
Copy the format you need
Copy the exact CSS value for your project.
Frequently asked questions
What is a HEX colour code?+
A HEX code like #4277D8 represents a colour as red, green and blue values in hexadecimal. It's the most common way to specify colours in CSS and design tools.
What's the difference between RGB and HSL?+
RGB describes a colour by its red, green and blue amounts. HSL describes it by hue, saturation and lightness, which many people find more intuitive for adjusting a colour.
Does it support alpha / transparency?+
This tool focuses on solid colours in HEX, RGB and HSL. For transparency you can append an alpha value to the RGB or HSL result in your CSS.
Is it free?+
Yes. Completely free and runs in your browser.