Color Converter
Pick a color or type a HEX, RGB, or HSL value to convert between formats instantly. Every field stays in sync, and each result has its own copy button — all in your browser.
All conversions run entirely in your browser — your colors are never uploaded.
Understanding the Color Converter
The Color Converter turns any color into HEX, RGB, and HSL at once. Pick a shade with the native color picker, type a hex code (full or shorthand), or dial in exact R/G/B or H/S/L values — every field stays in sync around a single color, and a large swatch shows the live result. It is built for front-end developers, designers, and anyone matching brand colors across CSS, design tools, and style guides. Each format has its own copy button so you can grab exactly what you need. Everything runs locally in your browser; no color you enter is ever uploaded.
How it works
All fields feed one source-of-truth RGB value. A hex string is validated, expanded if it is 3-digit shorthand (#abc becomes #aabbcc), then split into red, green, and blue bytes. RGB converts to HSL by normalizing channels to 0–1, finding the max and min to get lightness, deriving saturation from their difference, and computing hue from which channel is largest. Editing HSL runs the reverse math back to RGB. Whenever RGB changes, the tool re-renders HEX, the rgb() string, and the hsl() string together, so the three outputs always describe the same color.
Worked example
Type the brand green #16A34A. The tool splits it into R=22, G=163, B=74 and shows rgb(22, 163, 74). Converting to HSL, green is the largest channel, lightness lands at 36%, and saturation at 76%, giving hsl(142, 76%, 36%). Now drag the HSL lightness up to 100 and the color jumps to pure white — HEX shows #FFFFFF and RGB shows rgb(255, 255, 255) instantly. Click any row's Copy button to drop that exact format straight into your CSS.
Tips & common mistakes
- Use 3-digit shorthand like #abc for quick entry — it auto-expands to the full #aabbcc form.
- The leading # is optional in the hex field; only valid 3 or 6 hex digits are accepted, so typos are ignored instead of breaking the color.
- Copy the HSL value when you want to tweak lightness or saturation later — it is far more intuitive to adjust than raw hex.
- RGB channels are 0–255, but HSL saturation and lightness are percentages (0–100) while hue is degrees (0–360) — don't mix the ranges.
- Rounding to whole HSL values can shift a color by one unit when you convert back and forth; trust HEX or RGB for pixel-exact matches.
- Pick a color visually first, then read off the exact codes — faster than guessing hex digits by hand.
Related tools
Frequently Asked Questions
Which color formats does this support?
It converts between HEX (#RRGGBB), RGB (0–255 per channel), and HSL (hue 0–360, saturation and lightness 0–100%). Edit any format and the others update instantly.
Does it accept shorthand hex like #abc?
Yes. Three-digit shorthand such as #abc is expanded to #aabbcc automatically. You can type the value with or without the leading # — invalid characters are simply ignored.
Can I copy a single format?
Yes. Each result row — HEX, RGB, and HSL — has its own copy button, so you can grab just the format you need for your CSS, design tool, or code.