RGB, HEX, HSL & CMYK Color Converter
Convert RGB to HEX, or paste any color format and get every other format back instantly. All conversion happens in your browser.
- Free
- No sign-up
- Runs in your browser
- Works on mobile
CMYK is a standard on-screen approximation (K = 1 − max(R,G,B), then C/M/Y derived from K), not a color-managed print profile. Confirm against your printer's actual profile before a print run.
How to use this converter
- Type or paste a color into the input field. HEX, RGB, HSL, and CMYK are all auto-detected, no format selector needed.
- Or click the color swatch picker to choose visually.
- Every output format updates live as you type, including HWB, Lab, LCH and OKLCH. Click the copy icon next to any row to copy just that value.
- If you paste an
rgba()value with transparency, an RGBA row appears automatically.
Why convert between color formats
Different tools expect different formats: CSS and design software commonly use HEX or RGB, some design tools work in HSL because it maps more intuitively to "lighter/darker" and "more/less saturated," and print workflows use CMYK. Converting between them lets you move a single color across a whole workflow without guessing at the translation. For the fuller picture of when to reach for each format and why, see HEX vs RGB vs HSL vs CMYK: When to Use Each Format. The newer formats, Lab, LCH and OKLCH, describe color by perceived lightness, which makes it easier to build even lightness steps. CSS accepts oklch() and lab() directly.
Worked example
The same color, #00FFFF, in every format:
Frequently Asked Questions
Why don't my CMYK values match what I see in Photoshop or my print vendor's proof?
This converter uses the naive on-screen CMYK approximation, which doesn't account for your specific printer's ink profile, paper stock, or color management settings. Treat it as a starting estimate, not a final print value.
What's the difference between RGB and HSL?
RGB describes a color by its red, green, and blue light components. HSL describes the same color by hue (position on the color wheel), saturation (intensity), and lightness, often more intuitive when you want to make a color "lighter" or "less saturated" without changing its hue.
Can I convert a color with transparency (RGBA)?
Yes. Paste an rgba() value, an 8-digit hex code with an alpha channel (#RRGGBBAA), or a 4-digit hex shorthand (#RGBA), and the RGBA row will appear showing that transparency alongside the other formats.
Does this accept RGB percentage values?
Yes. Both integer syntax (rgb(255, 87, 51)) and percentage syntax (rgb(100%, 34%, 20%)) are accepted, matching the CSS Color 4 specification.
Do I need the # symbol in a hex code?
No. This converter accepts hex codes with or without the leading #, and in both 3-digit and 6-digit form.
Sources
- RGB, HEX, and HSL conversion formulas: standard CSS Color Module algorithmsSee the CSS Color Module Level 4 specification.
- HWB, Lab, LCH and OKLCH conversionsLab and LCH use the D50 white point as CSS does, following the conversion code in CSS Color Module Level 4. OKLCH follows Björn Ottosson's OKLab write-up. Results are rounded for display.
- RGB to CMYK approximation formula (K = 1 − max(R′,G′,B′))A widely-used on-screen approximation with no single canonical primary source. It is not a color-managed print conversion, as disclaimed above.
About this page
The conversion code follows the standard CSS Color Module formulas for RGB, HEX and HSL, and it was tested to confirm that colors survive a round trip between formats. CMYK is the common on-screen approximation, not a color-managed print conversion, and the page says so. Last reviewed: October 20, 2026.