Color Converter — HEX, RGB, HSL, CMYK Online

color converter — hex to rgb, hsl, and cmyk in one tool

This color converter syncs HEX, RGB, HSL, and CMYK formats in real time as you type in any field. Click the large color swatch to open the native color picker. The random color generator and recent colors history (stored in localStorage) make it easy to explore palettes. The built-in WCAG contrast checker shows AA and AAA pass/fail for any foreground/background combination. All color math happens in your browser.

Frequently Asked Questions

How do I convert HEX to RGB?

Type or paste a hex color code (such as #2563EB or 2563EB) into the HEX field. The color converter instantly converts it to RGB (red, green, blue values 0–255), HSL (hue 0–360°, saturation and lightness 0–100%), and CMYK (cyan, magenta, yellow, black 0–100%). You can also click the color swatch at the top to open your browser's native color picker.

What is HSL color format used for?

HSL (hue, saturation, lightness) separates the color identity (hue, 0–360°) from its intensity (saturation) and brightness (lightness). This makes it intuitive to create color variations: decrease lightness to darken, decrease saturation to mute. CSS natively supports HSL with the hsl(217, 91%, 60%) syntax, making it popular for design systems and theme variables.

How do I check color contrast for accessibility?

Enter your foreground color using the main color picker, then enter the background color in the Contrast Checker section. The tool calculates the WCAG contrast ratio and shows pass/fail badges for AA (≥4.5:1 for normal text, ≥3:1 for large text) and AAA (≥7:1 for normal text, ≥4.5:1 for large text) accessibility standards. A live text preview shows how the colors look together.

What is the difference between RGB and CMYK?

RGB (Red, Green, Blue) is an additive color model for screens — colors are created by combining light, with white being the maximum of all three. CMYK (Cyan, Magenta, Yellow, Black) is a subtractive model for print — colors are created by absorbing light via ink, with white being the absence of all inks. The same hex color may look different when printed in CMYK due to gamut limitations.

Is my color data sent to a server?

No. All color conversion, contrast calculation, and recent color history storage runs entirely in your browser using JavaScript math. No color data is ever transmitted to any server. The recent colors history is stored in your browser's localStorage under the key "encodedecode-colors" and never leaves your device.