Color Converter
Start from a hex color, three RGB channels, or four CMYK percents.
About this tool
The page turns the hex color into red, green, and blue, then into hue, saturation, and lightness. Editing the hex and converting again replaces the previous reading.
Alpha is not part of this conversion. Use a contrast or palette tool when the job is a pair of colors or a set.
How to use it
- Choose Hex, RGB, or CMYK as the source.
- Enter that form. Hex accepts #RGB and #RRGGBB. RGB channels are whole numbers from 0 to 255. CMYK values are percents from 0 to 100.
- Convert. The first line is lowercase hex so the color can open in another color tool. The CMYK line is an sRGB approximation, not a press match.
Limitations
- The hex parser accepts #RGB and #RRGGBB. Named colors and eight-digit alpha hex are rejected.
- CMYK is an unprofiled approximation from sRGB. Ink, paper, and the printer profile are not part of the math.
One hex triple, several notations
What is parsed, and what is rounded
Hex is one of three sources. With or without a leading hash, three digits are expanded by doubling each digit. Six hex digits are read as red, green, and blue from 0 to 255. Named colors and eight-digit alpha are rejected. RGB mode reads three whole numbers in that same 0 to 255 range. CMYK mode reads four percents, rounds each to an integer, and runs the inverse of the ink formula below. The first output line is still the six-digit hex form. The RGB line rounds each channel to an integer. Further lines round hue, saturation, and lightness for HSL, and the matching channels for HSV and HWB, to integers. OKLab keeps three decimals. CMYK is rounded to integer percents.
HSL starts from channels divided by 255. Lightness is the average of the largest and smallest channel. If those two are equal, hue and saturation are both zero. Otherwise saturation is the chroma divided by the span that depends on whether lightness is above one half, and hue is the usual six-sector angle times 60 degrees. HSV uses the same hue idea, sets value to the largest channel, and sets saturation to chroma over that largest channel, or zero when the color is black. HWB reuses the HSV hue. Whiteness is value times one minus saturation, and blackness is one hundred minus value. Those are encodings of the same triple. They are not new measurements.
OKLab versus the CMYK line
OKLab linearizes each sRGB channel with the standard transfer, cube-roots a linear combination into the LMS intermediates, and applies the published OKLab matrix to produce L, a, and b. The page prints that triple. It does not convert OKLab back, and it does not claim the other lines are perceptually uniform. Hue rotations for palettes happen in HSL, not here.
The CMYK line is the textbook conversion. Black is one minus the largest of the three unit channels. When black is 1, the other inks are zero. Otherwise each ink is the residual of that channel after black, divided by one minus black, then scaled to a percent. The line is labeled approximate and not a press profile. Printer CMYK depends on ink, paper, and a profile this page does not load. Display calibration is also outside the math. The hex you typed is assumed to be sRGB, not a photo embedded in a different space. A wide-gamut monitor can show the swatch differently. The numbers will not follow that monitor.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

