Color Code Converter

Convert color codes, from HEX and RGB to OKLCH and Display P3.

All color tools

HEX, RGB, HSL, HSV, HWB, Lab, LCH, OKLab, OKLCH, Display P3, CMYK, and CSS names.

Your color

Within sRGB · Opacity 100%

Copy a color code
More color formats
About precision and color ranges

Standard keeps codes compact. High and Maximum retain more decimal places. The precision you choose applies to copied codes and batch results; HEX always uses 8-bit channels.

Some colors fall outside sRGB, the color range used by HEX and ordinary RGB. Their sRGB match reduces color intensity while preserving hue and lightness where possible. Lab, LCH, OKLab, OKLCH and Display P3 values retain the original color.

CMYK is a mathematical approximation without an ICC print profile, and it does not include transparency. Preview appearance also depends on your display.

Batch convert colors

Convert a color without losing its context
  1. Paste a fixed HEX, RGB, HSL, CSS name, CMYK, HSV or supported CSS color value. The converter preserves the valid input while reporting errors in a replacement.
  2. Copy HEX, RGB or HSL directly. Open More color formats for HSV, HWB, CMYK, Lab, LCH, OKLab, OKLCH and Display P3.
  3. Choose Standard, High or Maximum precision. Codes and batch results use that setting; HEX remains an 8-bit representation.
  4. For a color outside sRGB, compare the original with its sRGB match. Screen formats use the match, while perceptual and Display P3 values retain the original color.
  5. Batch-convert up to 100 lines. Once converted, changes to the list, output format or precision refresh the results. Invalid entries are identified, and CSV includes each line’s status.
  6. Share the individual color or download batch results as CSV. CMYK is approximate without a print profile and does not include transparency.

Convert cmyk(15 50 0 10) at Maximum precision to retain its fractional RGB values, or try a Display P3 input to compare color ranges.