Color Converter
Convert colors between HEX, RGB, HSL, HSV and CMYK
All five representations update live as you type or pick.
Colour spaces and their small print
Every format from one paste
Paste "indigo", "#4f46e5", rgb(79,70,229) or hsl(245,58%,59%) and instantly get all five representations — no retyping a color in every mode.
Live swatch with picker
The preview updates as you type or drag the native color picker, so what you convert is exactly the swatch you see.
✦ What is a color converter?
A color converter translates one color between the dialects that different tools speak: design software hands you HEX or CMYK, stylesheets want rgb or hsl functions, and data tools may ask for hsv. Paste the value you already have and this tool computes every other representation with the standard forward and inverse formulas, shows a live swatch for visual confirmation, and offers each format in its own copyable row. A native color picker sits next to the text box, so you can also start from a visual choice and read off the exact numbers behind it.
Five dialects of the same hue
- HEX in 3, 4, 6 or 8 digits, with the 8-digit form carrying the alpha channel
- Functional inputs such as rgb, rgba, hsl, hsla, hsv, hsb and cmyk, with percent, comma or slash separated arguments accepted
- Full working set per input: canonical hex plus rgb, hsl, hsv and cmyk text rows
- Alpha preserved from 8-digit hex or rgba input, expressed as a trailing hex pair on output
- Out-of-range channels clamped into their legal spans, with hue wrapped around the 360-degree wheel
From brand swatch to stylesheet in seconds
- Carrying a brand color from a design file into CSS variables without reopening a picker five times
- Turning a print CMYK value into a web hex for a landing page, or reading hsl numbers for gradients and dark-mode palettes
- Double-checking how another converter rounded a tricky hue by comparing every representation side by side
Rounding and gamut caveats
Conversions round to one decimal place for percentages and hue, so converting back and forth can drift the last digit; that is display rounding, not data corruption. CMYK math here is the naive device-independent kind, so a CMYK value tuned for one printer may look slightly different on screen and in print. Unparseable input clears the swatch to a neutral tone and names the offending value instead of guessing a nearby color.
Privacy: the text you type is converted locally and never sent anywhere; close the tab and nothing of your palette remains behind.
Last updated · 2026-09-01
HEX, RGB, HSL and what contrast really means
- HEX and RGB are the same sRGB values in different notation — converting between them is pure arithmetic, never a colour shift.
- HSL wraps the same gamut on a cylinder: hue spins, saturation radiates, lightness rises. Equal HSL steps do not look equally different — perceptual spaces like OKLCH were invented for that.
- WCAG contrast is computed from relative luminance after gamma expansion, not from raw RGB averages; the checker below uses the official 2.1 formula.
Frequently asked questions
Which formats are supported?⌄
Hex (3, 4, 6 and 8 digits — 8-digit adds alpha), rgb()/rgba(), hsl()/hsla(), hsv()/hsb() and cmyk(). Input is normalized automatically whether you type #FFF, rgb(255 0 0) or hsl(0, 100%, 50%).
Are the conversions exact?⌄
They match the standard CSS conversion formulas (rounded to whole channels). HSL/HSV hues are preserved at one-decimal precision; CMYK is computed with conventional conversion and rounded to one decimal percent.
Is my color sent anywhere?⌄
No. Everything runs in your browser with plain JavaScript — nothing you enter is transmitted or stored.