Skip to tool

Color Code Converter

HEX
RGB

rgb(99, 102, 241)

HSL

hsl(239, 84%, 67%)

CMYK
59
58
0
5

Color Harmonies

Complementary

Analogous

Triadic

▸About this tool

Convert between HEX, RGB, HSL, and CMYK color formats. Includes color harmony suggestions.

▸Privacy and details

Fast browser processing with no account required.

Optimized for desktop and mobile with accessible controls.

▸How to use
  1. Click the large color swatch to open the browser color picker and select a color.
  2. Or type directly into any HEX, RGB, or HSL field: all other formats update automatically.
  3. Click Copy next to any format to copy that color value to your clipboard.
  4. Scroll down to see complementary, analogous, and triadic color harmony swatches.
  5. Click any harmony swatch to copy its HEX value.
▸Why use this tool

Designers and developers constantly switch between color formats: HEX for CSS, RGB for code, HSL for color manipulation, and CMYK for print. This tool converts all four simultaneously with a visual color picker, making it the fastest way to get the exact color format you need.

Frequently Asked Questions

What color formats are supported?

HEX (e.g. #ff5733), RGB (e.g. 255, 87, 51), HSL (hue 0 to 360 degrees, saturation and lightness 0 to 100%), and CMYK (cyan, magenta, yellow, key/black 0 to 100%). All formats update instantly when any field is changed.

How do I pick a color?

Click the large color swatch to open the browser's native color picker. Alternatively, type directly into any HEX, RGB, HSL, or CMYK field and all other fields update automatically.

What are the color harmony suggestions?

Complementary (opposite on the color wheel), analogous (adjacent colors ±30°), and triadic (three colors 120° apart). These combinations are commonly used in design for harmonious palettes.

How is CMYK calculated?

CMYK is derived from RGB: divide each RGB channel by 255, find the key (K) as 1 minus the maximum channel, then compute C, M, Y from the remaining channels. This is a mathematical approximation; actual print CMYK depends on the printer profile.