What Is a Color Converter?
A color converter translates a color from one format to another β such as from HEX to RGB, or RGB to HSL. Different tools and contexts use different color formats: web CSS uses HEX and RGB, design tools often use HSL for its intuitive controls, and print workflows use CMYK. This converter lets you move between all four formats instantly with a live preview.
How to Use This Color Converter
Edit any field in any format β HEX, RGB sliders, HSL sliders, or CMYK sliders β and all other formats update automatically. The large color swatch shows a live preview. Use the native color picker to choose a color visually. Click Copy on any format card to copy that format's value to your clipboard.
Color Format Formulas
HEX β RGB
HEX to RGB: Split #rrggbb into pairs and convert each from base-16 to decimal.
RGB to HEX: Convert each decimal (0β255) to a two-character hex string with toString(16).padStart(2,'0').
Example: #3b82f6 β R = 0x3b = 59, G = 0x82 = 130, B = 0xf6 = 246 β rgb(59, 130, 246)
RGB β HSL
Normalise RGB values to 0β1 range. Find max and min channel values. Compute Lightness = (max+min)/2. Saturation = (maxβmin)/(1β|2Lβ1|). Hue depends on which channel is max.
RGB β CMYK
RGB to CMYK: K = 1 β max(R,G,B)/255. C = (1 β R/255 β K) / (1 β K). M = (1 β G/255 β K) / (1 β K). Y = (1 β B/255 β K) / (1 β K).
CMYK to RGB: R = 255 Γ (1βC) Γ (1βK). G = 255 Γ (1βM) Γ (1βK). B = 255 Γ (1βY) Γ (1βK).
Frequently Asked Questions
What is the difference between RGB and HEX?
Both represent the same colors β RGB uses decimal numbers (e.g. rgb(255, 128, 0)) and HEX uses hexadecimal (e.g. #ff8000). Each pair of hex digits maps to one RGB channel. They are interchangeable β choose the format your tool expects.
What is HSL?
Hue (0β360Β°), Saturation (0β100%), Lightness (0β100%). More intuitive for design: to make a color darker, decrease Lightness; to desaturate it, decrease Saturation β without touching Hue. HSL is supported in all modern CSS browsers.
What is CMYK and when is it used?
Cyan, Magenta, Yellow, Key (Black). Used in color printing β subtractive color model where inks on white paper absorb light. Designers specify CMYK for print materials. Note: some bright RGB/screen colors are outside the CMYK gamut and cannot be reproduced exactly in print.
How do I convert HEX to RGB manually?
Split the 6-digit hex into pairs: #1a2b3c β 1a, 2b, 3c. Convert each: 0x1a = 26, 0x2b = 43, 0x3c = 60 β rgb(26, 43, 60). This converter does it automatically.
Why do CMYK colors look different on screen vs. print?
Screens emit light (additive RGB) and can display vivid colors outside the printable CMYK range. When converted, out-of-gamut colors are mapped to the nearest printable color, which may appear less vivid. Always soft-proof in your design application before printing.