Color Format Converter
Paste any color in almost any notation and convert it to every common format at once. The converter auto-detects HEX (3, 4, 6, or 8 digit), rgb() and rgba(), hsl() and hsla(), and CSS color names, then outputs HEX, HEX8, RGB, RGBA, HSL, HSLA, HSV, HWB, CMYK, the nearest color name, and a ready-to-use CSS variable. It handles the messy details for you: extra whitespace, mixed case, comma or modern space syntax, percentage channels, and alpha. Rather than silently correcting invalid input, it shows a clear validation error so you always know what you are converting. Every output copies with one click, and the whole thing runs in your browser using the site’s shared color engine.
| Format | Value | Copy |
|---|
How to use the Color Format Converter
- Paste any color. Enter a HEX, rgb(), hsl(), or CSS color name; the format is detected automatically.
- Review every format. See HEX, RGB, HSL, HSV, HWB, CMYK, the nearest name, and a CSS variable side by side.
- Copy what you need. Click copy on any output value.
Examples
- From a color name: Enter “rebeccapurple” to get #663399, rgb(102, 51, 153), and every other format.
- From modern syntax: Paste rgb(255 0 0 / 0.5) to get the HEX8 #ff000080 and matching HSLA.
How it works
The converter parses your input into RGB, then derives each other space with a defined transform. HEX and RGB are exact; HSL, HSV, and HWB are re-expressions of the same color; and CMYK is a gamut approximation. Round-trip differences of a unit come from rounding, and invalid input is reported rather than guessed.
Common use cases
- Translating a color between the many formats a project uses
- Getting an approximate CMYK breakdown from a web color
- Validating and normalizing a color pasted from anywhere
Privacy
All color calculations run in your browser. Nothing you enter is sent to a server. Saved palettes and recent colors are kept only in your browser’s local storage and can be cleared at any time.
Frequently asked questions
Which input formats are detected?
HEX (3/4/6/8 digit), rgb()/rgba(), hsl()/hsla(), hsv(), hwb(), cmyk(), and CSS color names, in comma or modern syntax.
Why is CMYK only approximate?
CMYK depends on inks, paper, and a color profile. Our output is a mathematical estimate for preview, not a print-accurate value.
Does it handle percentages and alpha?
Yes. Percentage channels, alpha in comma or slash syntax, and mixed case are all supported.
What happens with an invalid value?
You get a specific validation message, such as an unrecognized format or bad HEX length, instead of a silently altered result.