Color Converter

Convert colors between HEX, RGB, and HSL formats, for free.

This tool runs entirely in your browser. Your files are never uploaded to a server.

HEX

#3b82f6

RGB

rgb(59, 130, 246)

HSL

hsl(217, 91%, 60%)

What this tool does

Converts a color between the three formats most common in CSS and design tools — HEX (`#rrggbb`), RGB (`rgb(r, g, b)`), and HSL (`hsl(hue, saturation%, lightness%)`) — updating all three the moment you change any one of them, plus a color picker for choosing visually.

How to use it

Type a value into the HEX, RGB, or HSL field, or click the color picker swatch to choose a color visually; the other two fields update automatically to match. Copy whichever format you need with the copy button.

Worked example

A pure medium blue like `#3366CC` corresponds to `rgb(51, 102, 204)` and `hsl(220, 60%, 50%)` — the same color, described three different ways depending on whether you're thinking in hexadecimal bytes, red/green/blue channels, or hue/saturation/lightness.

HEX and RGB vs. HSL

HEX and RGB both describe a color as amounts of red, green, and blue light, just written differently (hexadecimal pairs vs. decimal 0–255 values); HSL instead describes a color by its position on a color wheel (hue), how vivid it is (saturation), and how light or dark it is (lightness), which many people find more intuitive for adjusting shades.

Where each format is used

HEX is the most common format in CSS and design software for a compact, exact color; RGB is common in canvas/graphics code and where individual channels matter; HSL is often preferred when generating color variations, since sliding the lightness or saturation value produces predictable lighter, darker, or more muted versions of the same hue.

Limitations

This tool converts fully opaque colors between these three formats; it does not handle alpha transparency (RGBA/HSLA), named CSS colors, or other color spaces like CMYK or LAB.

Privacy

Conversion runs entirely in your browser via client-side JavaScript; the colors you enter are never uploaded to a server or stored.

Frequently Asked Questions

Which color formats does this tool support?
You can convert between HEX (#ffffff), RGB (rgb(255,255,255)), and HSL (hue, saturation, lightness) formats, in any direction.
Can I pick a color visually?
Yes, use the built-in color picker to select a color and instantly see its equivalent HEX, RGB, and HSL values.
Is this tool free and does it store my colors?
It's completely free with no sign-up. The conversion runs locally in your browser, so no colors or data are sent to or stored on a server.