ChromaWell

Color Converter

Paste any hex, RGB, HSL, HSV, CMYK, Lab, or OKLCH value and get every other format instantly, computed client-side by ChromaWell's tested color-core library — no server round-trip, no rounding surprises.

HEX
#4C8DF6
RGB
rgb(76, 141, 246)
HSL
hsl(217.1, 90.4%, 63.1%)
HSV
hsv(217.1, 69.1%, 96.5%)
CMYK
cmyk(69.1%, 42.7%, 0%, 3.5%)
Lab
lab(59.19 13.02 -58.67)
OKLCH
oklch(0.6522 0.1705 259.6)

Nearest named colors

DodgerBlue
soft blue
CornflowerBlue

How it works

Every conversion routes through RGB as the common intermediate representation, the same way most color libraries handle it internally: hex parses to an 8-bit RGB triplet, HSL and HSV each convert to and from RGB using the standard cylindrical-coordinate formulas (the classic 1978 Smith HSV and 1915 Munsell-derived HSL models), CMYK subtracts each RGB channel from 1 and factors out the shared black component, and Lab/OKLCH both go through a linear-light XYZ step first — sRGB values are gamma-decoded to linear light, transformed by the CIE 1931 XYZ matrix, then mapped into Lab's opponent-color space or, for OKLCH, into the newer Björn Ottosson 2020 Oklab space designed specifically to fix Lab's known perceptual-uniformity distortions in the blue region. The gamma-decode step itself isn't a flat exponent — sRGB uses a piecewise curve (a near-linear segment for very dark values below roughly 0.04 in normalized terms, then a power curve of approximately 2.4 above that), which is a detail naive implementations sometimes approximate with a flat gamma-2.2 curve, introducing small but measurable errors specifically in shadow tones.

Worked example

Take a mid-saturation blue, #4C8DF6. Converting through the pipeline: RGB(76, 141, 246) → HSL(217°, 89%, 63%) → HSV(217°, 69%, 96%) → CMYK(69%, 43%, 0%, 4%) → Lab(60.1, 6.0, -52.8) → OKLCH(0.65, 0.16, 260°). Notice the Lab a/b values are strongly negative-blue (low a toward green, very negative b toward blue) while OKLCH expresses the same color as a single hue angle near 260° — OKLCH's polar form is usually easier to reason about for design work (rotate the hue, keep lightness/chroma fixed) than Lab's two-axis a/b split. A second example makes the achromatic case concrete: a neutral mid-gray, #767676, converts to RGB(118, 118, 118) → HSL(0°, 0%, 46%) → CMYK(0%, 0%, 0%, 54%) → Lab(50.0, 0.0, 0.0) — every chromatic channel collapses to exactly zero, which is a useful sanity check that the pipeline is implemented correctly, since any true gray should always land at a=0, b=0 in Lab and 0% saturation in HSL regardless of which format it started from.

When to use this tool

Reach for this tool when you already have a color in one format and need it in a different one for a handoff — a designer hands you a Figma hex value and your CSS-in-JS theme needs HSL for a lightness-based hover-state calculation, or a print vendor asks for CMYK values from a brand's RGB logo file. It's also useful when auditing an existing design-token file: pasting each token's hex through the converter and checking the OKLCH lightness value is a fast way to confirm a supposedly 'evenly spaced' lightness scale (like a Tailwind-style 50-950 ramp) is actually perceptually even rather than just evenly spaced in raw HSL lightness, which frequently isn't the same thing. If you specifically need the nearest CSS-named color rather than a raw conversion, use the Color Name Finder instead; if you're starting from a visual pick rather than a known value, the Color Picker is the faster path in.

Precision & accuracy

All conversions carry rounding to a sensible decimal precision per format (integers for RGB/HSL/HSV/CMYK percentages, one decimal place for Lab and OKLCH components) — enough precision that a round-trip conversion (hex → HSL → hex) returns the exact original hex in the overwhelming majority of cases, with the rare off-by-one at extreme edge values being a known, documented rounding artifact of converting between integer and floating-point color spaces, not a bug in the underlying math, which is covered by the round-trip unit tests referenced above. Where precision matters most in practice is CMYK: because the naive RGB-to-CMYK formula has no single canonical rounding convention (some implementations round each channel independently, others round K first and derive C/M/Y from the rounded value), two different tools can report CMYK values that differ by a percentage point or two for the identical input RGB — neither is 'wrong,' they're just applying the rounding order differently, which is worth knowing before treating a one-point CMYK discrepancy between tools as an error.

FAQ

Which color formats are supported?

Hex, RGB, HSL, HSV, CMYK, Lab, and OKLCH — the full set covered by our unit-tested conversion library, including round-trip tests to confirm hex → RGB → hex returns the original value.

Is the math accurate?

Every conversion path has round-trip and known-value tests (pure red/green/blue/white/black/mid-gray) checked against documented reference values — see /methodology/ for the full test suite.

Why does CMYK look different from what my printer produces?

CMYK here is the naive RGB-to-CMYK subtractive formula, not a printer's actual ICC color profile — real print output depends on the specific ink, paper, and press, so treat the CMYK values as a starting estimate, not a proof for production printing.

What's the difference between Lab and OKLCH for design work?

Both aim for perceptual uniformity (equal numeric steps look like equal visual steps), but OKLCH (2020) corrects distortions in Lab (1976) that are most visible in blues and purples, and its polar hue-angle form maps more intuitively onto 'rotate the hue' design thinking than Lab's a/b axes.

Can I paste a color name instead of a hex code?

Yes — any of the 148 CSS/X11 named colors (like 'tomato' or 'rebeccapurple') resolves directly to its hex value before conversion, in addition to raw hex, rgb(), and hsl() input strings.

Does this tool handle alpha/transparency across every format?

Yes — an 8-digit hex (#RRGGBBAA) or an rgba()/hsla() input carries its alpha value through the whole pipeline and reports it consistently for every output format that supports one, though CMYK and Lab traditionally have no native alpha channel, so alpha is shown alongside those as a separate 0-1 value rather than folded into the format itself.