Convert colors between every common format — HEX, RGB, RGBA, HSL, HSV, HWB, CMYK, CIELAB, LCH, OKLab, OKLCH and XYZ — with the exact conversion pipeline CSS Color Level 4 defines. Each converter shows its working, previews the color live, and warns honestly about gamut and CMYK approximation.
HEX, RGB, HSL and HSV Converters
- HEX to RGB Converter
Convert a hex color code to RGB instantly.
- RGB to HEX Converter
Convert RGB channel values to a hex color code.
- HEX to RGBA Converter
Turn a hex color plus an opacity into rgba() — pick the color, slide the alpha, and get rgba(30, 144, 255, 0.
- RGBA to HEX Converter
Convert rgba() colors to hex — including the alpha channel.
- HEX to HSL Converter
Convert hex color codes to HSL — hue on the 360° wheel, saturation and lightness as percentages.
- HSL to HEX Converter
Convert hsl() colors to hex codes.
- RGB to HSL Converter
Convert RGB values to HSL and see the arithmetic: lightness is the average of the largest and smallest channel, saturation comes from their spread, and hue from which channel leads.
- HSL to RGB Converter
Convert hsl() colors back to RGB channels.
- HEX to HSV Converter
Convert hex colors to HSV (also called HSB) — the hue/saturation/value model used by the color pickers in Photoshop, GIMP and Figma.
- HSV to HEX Converter
Turn HSV/HSB picker values into a usable hex code.
- RGB to HSV Converter
Convert RGB channels to HSV: value is the largest channel, saturation the spread relative to it, hue the angle from which channel dominates.
CMYK Converters
- HEX to CMYK Converter
Convert a hex color to CMYK ink percentages using the standard formula: black is the missing brightness, then cyan, magenta and yellow cover what remains.
- CMYK to HEX Converter
Convert CMYK ink percentages to a hex code for screens.
- RGB to CMYK Converter
Convert RGB screen colors to CMYK ink percentages, with the working shown: K = 1 − max(R,G,B)/255, then C, M and Y from the remaining ink.
- CMYK to RGB Converter
Convert CMYK values back to RGB for on-screen use.
LAB, OKLCH and Modern CSS Converters
- HEX to LAB Converter
Convert hex colors to CIELAB — the classic perceptual space where L* is lightness and a*/b* are the green–red and blue–yellow axes.
- LAB to HEX Converter
Convert CIELAB values to hex.
- RGB to LAB Converter
Convert RGB channels to CIELAB coordinates for perceptual work — color difference, gamut math, print pipelines.
- LAB to RGB Converter
Convert CIELAB back to RGB channels.
- OKLCH to HEX Converter
Convert oklch() colors to plain hex for older tooling and fallbacks.
- RGB to OKLCH Converter
Convert RGB colors to OKLCH — the modern perceptual space behind new CSS color work, where equal lightness numbers actually look equally light.
- OKLCH to RGB Converter
Convert oklch() values to RGB channels.
- OKLab Color Converter
Convert any color to and from OKLab — the rectangular form of OKLCH, with L for lightness and a/b axes instead of chroma and hue.
- LCH Color Converter
Convert colors to and from CIELCH — CIELAB expressed as lightness, chroma and hue, the polar form that makes Lab intuitive to edit.
- XYZ Color Converter
Convert between CIE XYZ (D65) and ordinary colors.
- CSS Color Format Converter
Convert a whole list of CSS colors to one target notation in a single pass.
Every notation, one pipeline
Color notations multiply because contexts differ — hex for stylesheets, HSL for humans, HSV for picker dialogs, CMYK for print conversations, Lab for measurement, OKLCH for modern CSS and design tokens, XYZ underneath them all. The converters in this hub translate between all of them through one spec-exact pipeline (CSS Color Level 4’s own matrices and curves), so any two tools here agree with each other and with your browser. Each converter shows its arithmetic for your input — these pages teach the conversions while performing them.
The three families
The HEX/RGB/HSL/HSV family covers sRGB’s everyday notations — lossless respellings of the same 24 bits, with the classic derivations (base-16 pairs, max/min analysis, hue sectors) worked live. The CMYK family crosses into print’s subtractive world with the standard nominal formulas and unusually honest labeling — screen-to-ink is profile-dependent, and every page says so. The Lab/OKLCH family enters measurement and perception: D50-referenced CIELAB and LCH matching instruments and CSS lab(), OKLab/OKLCH matching modern CSS and design practice, XYZ as the verifiable root, plus batch conversion for whole stylesheets.
Conversions with a conscience
Two failure modes plague casual converters, and this family is built against both. Silent gamut damage: Lab and OKLCH describe colors sRGB cannot show, and these tools flag them and route to proper chroma-preserving mapping instead of clipping channels quietly. Silent pipeline shortcuts: skipping linearization or white-point adaptation produces values that disagree with browsers by visible margins — the pipeline here is the reference one, and the spec’s published values (red’s lab and oklch coordinates, D65’s white point) are standing test cases.
Picking a converter
Know both formats? Use the dedicated pair page — its working, examples and FAQs are specific to that translation. Unsure what you have? The Complete Color Converter parses any notation and shows all twelve. Whole list to migrate? The CSS Color Format Converter batches up to 200 lines with originals preserved as comments. Print question? Start at the CMYK pages’ honesty notes before trusting any number.