Color Converter
HEX
→
RGB
→
HSL

Free · no sign-up · nothing to install

Color Converter

Paste a HEX, RGB or HSL value — get every other format plus ready-to-paste CSS instantly, with a live swatch you can eyeball before you ship.

Convert a color

Preview · click a chip to copy it · labels flip light/dark automatically for contrast.

#RGB, #RRGGBB or the color picker.
0–255 per channel.
Hue 0–360, s / l 0–100.
HEX #4F46E5
RGB rgb(79, 70, 229)
RGB (raw) 79, 70, 229
HSL hsl(243, 75%, 59%)
CSS custom property --color: #4F46E5;

How it works

1 · Paste any notation

Drop in a HEX code from a brand guide, or type the RGB / HSL values you already have.

2 · Convert live

Every other format is recomputed as you type — no button, no request, no waiting.

3 · Copy and ship

One click copies rgb(), hsl(), the raw channels or a CSS custom property straight into your stylesheet.

Built for mid-task CSS work

Readable on any color

Chip labels measure relative luminance and flip white / dark so #FFFFFF and #000000 both stay legible.

Tabular values

Every code is set in monospace with tabular digits, so channels line up and digit slips are easy to spot.

Nothing leaves the page

Conversion is pure arithmetic in your browser — no uploads, no accounts, no server round trip.

Short HEX when it is exact

#FFCC00 also appears as #FC0, but only when the short form is a lossless match.

Typo-tolerant

Bad input keeps the last good swatch on screen with a hint, instead of blanking the page.

Native picker on standby

Prefer eyes to arithmetic? Click the swatch tile and pick visually; the fields fill themselves in.

FAQ

Are the values exact?

HEX is always exact. RGB and HSL are rounded to whole numbers (hue to a degree, saturation and lightness to a percent), so feeding the displayed HSL back in can shift a channel by up to 5 out of 255 — the swatch, HEX and RGB rows always show the true color.

Which input formats do you accept?

HEX as #RGB, #RRGGBB or #RRGGBBAA, with or without the leading #, in any case. RGB takes three numbers from 0 to 255; HSL takes hue 0–360 and saturation / lightness 0–100.

Is my color saved or sent anywhere?

No. The conversion runs in your browser as plain JavaScript — there is no upload, no account and no server call.

The Copy button did nothing. Why?

Some browsers block clipboard access outside secure contexts. In that case the tool falls back to a hidden selection copy, and you can always select the monospace value and press Ctrl / ⌘ + C.

Latest updates

More free tools

Step-by-step guides in our blog & guides.

Private JSON Formatter ICS Calendar Generator Accurate Calorie Calculator Facebook Ad Mockup Generator Webpage To Markdown Converter Product Mockup Ai Generator Concrete Mix Calculator Valor Do Gerador De Energia World Time Meeting Planner Image Compressor To 50kb Pdf