# Color Converter — HEX, RGB, HSL & CMYK

> Convert colors between HEX, RGB, HSL, and CMYK in your browser. Pick a color, copy CSS-ready values, and check contrast locally.

Source: https://toolpantry.app/color-converter

## About

Convert one color between HEX, RGB, HSL, and CMYK. Pick a swatch, copy CSS-ready values, and check a text/background contrast ratio without uploading anything.

## Quick answer

**How do I convert HEX to RGB?** Paste a HEX, RGB, or HSL value and the other formats update instantly, with a live swatch and contrast hint.

## How to convert between color formats

1. **Enter the color** — HEX, RGB, HSL, or CMYK, any direction.
2. **Read every format at once** — with a live swatch and a contrast hint.
3. **Copy the value the destination needs** — CSS, design tool, or printer.

## Which format to use where

- HEX for web code; RGB when scripting or using APIs
- HSL when you intend to tweak lightness or saturation by hand
- CMYK only as a starting estimate for print — real conversions need ICC profiles

## Good to know

On-screen CMYK conversions are approximations; print colors depend on ink, paper, and profile, so never promise a print match from a hex value. The contrast hint uses the WCAG idea that normal text wants roughly 4.5:1 against its background — it is worth checking before shipping any color pair. Related: [palette extractor](https://toolpantry.app/image-palette) and [gradient generator](https://toolpantry.app/css-gradient-generator).

## Notes

HEX, RGB, and HSL describe the same screen color in different coordinate systems. CMYK here uses standard sRGB math and is only a screen preview; print production should use the printer's ICC profile.

## FAQ

**Which formats are supported?**

The converter accepts a 3- or 6-digit HEX value and editable RGB or HSL channels. It shows matching HEX, RGB, HSL, and CMYK output with one-click copy buttons.

**Is CMYK exact for printing?**

No. The CMYK value is a standard mathematical conversion from sRGB for orientation. A print workflow should use the destination printer or press ICC profile.

**Does the color leave my browser?**

No. Conversion, contrast math, and copy-ready output are generated in this page with local JavaScript. No color data is sent to a server.
