Color Code Converter

Convert between HEX, RGB, HSL, CMYK, and other color formats.

All color tools

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

Your color
Dahlia Purple

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

How to convert color codes
  1. Paste a HEX, RGB, HSL, CSS color name, CMYK, HSV, or another supported fixed CSS color value. The color code converter displays the same input in multiple formats and keeps the last valid result if a replacement is invalid.
  2. Copy HEX, RGB, or HSL directly. More color formats includes HSV, HWB, CMYK, Lab, LCH, OKLab, OKLCH, and Display P3. HEX is a compact channel notation; RGB uses red, green, and blue components; HSL describes hue, saturation, and lightness.
  3. Choose Standard, High, or Maximum precision for numeric results. More decimal places can preserve conversion detail, but HEX still uses 8-bit channels. Check whether your destination format supports transparency.
  4. For an out-of-sRGB input, compare the original color with its sRGB match. The sRGB output cannot reproduce every wider-gamut color; perceptual and Display P3 values retain the original color information.
  5. Use batch conversion for up to 100 lines. After conversion, edits to the inputs, output format, or precision update the results. Download CSV to retain the values and each line’s status, or share an individual color.

Convert #336699 to RGB: its components are 51, 102, and 153. This changes the notation, not the intended sRGB color. CMYK conversion is an approximation without a printer/ink profile and does not preserve transparency; use a print workflow with the appropriate profile for production output.