Colour Converter
EverydayConvert colour codes between HEX, RGB, RGBA, HSL, HSV, and CMYK instantly. Essential for Indian web designers, UI developers, and graphic artists.
What is a Colour?
The Colour Converter converts any colour between the five digital colour representations used across web design, UI development, and print production: HEX, RGB, HSL, HSV (also called HSB), and CMYK. Type or paste any colour value in any format, and all five update instantly — no manual calculation, no formula lookup.
Every colour on a screen is ultimately a combination of red, green, and blue light. Different tools and workflows describe that combination in different mathematical notations:
- HEX (
#FF5733) — a six-character hexadecimal string, two characters per channel. The universal language of CSS, browser DevTools, and design handoff. - RGB (
rgb(255, 87, 51)) — three decimal values 0–255. Used in CSS, JavaScript canvas, and every design tool's colour picker. - HSL (
hsl(11, 100%, 60%)) — Hue (the colour's position on the colour wheel, 0–360°), Saturation (intensity, 0–100%), Lightness (brightness, 0–100%). Preferred by modern CSS frameworks like Tailwind because adjusting lightness by a fixed step creates consistent colour palettes. - HSV / HSB (
hsv(11, 80%, 100%)) — similar to HSL but uses Value/Brightness instead of Lightness. Adobe Photoshop and Illustrator use HSB as the default colour model in their colour pickers. - CMYK (
cmyk(0%, 66%, 80%, 0%)) — Cyan, Magenta, Yellow, Key (Black). The ink model for physical printing. Every print job in India — packaging, business cards, brochures, banners — uses CMYK values.
For Indian designers working across both screen and print, or developers translating a Figma HEX colour into Tailwind HSL, this converter eliminates the manual conversion step that interrupts creative flow. Use the Number Base Converter alongside this tool when you need to understand the hexadecimal arithmetic behind HEX colour codes.
How to use this Colour calculator
- Pick a colour using the swatch — click the large colour square in the hero panel to open the native system colour picker. Choose any colour and all five format cards update instantly.
- Type a HEX code directly — in either the hero's HEX input or the HEX card below, type a 6-character hex code (e.g.,
2F6FEDor#2F6FED). All other formats update as soon as 6 valid characters are entered. - Edit any component — click into any number field in the RGB, HSL, HSV, or CMYK cards and type a new value. Changing R to 0 while G=255, B=0 immediately shows the equivalent HEX #00FF00 and HSL hsl(120,100%,50%).
- Copy the format you need — click the Copy button on any format card to copy that colour's CSS-ready string to your clipboard. The button confirms with "✓ Copied" for 2 seconds.
- Share the colour — the URL updates automatically with
?hex=RRGGBB. Copy the page URL to share the exact colour with a colleague or client. - Interpret the colour info strip — use the Hue, Saturation, and Lightness values to understand the colour's character and whether it needs adjustment for contrast, print reproduction, or palette consistency.
Formula & Methodology
### HEX ↔ RGB (exact, lossless)HEX "#RRGGBB" → RGB: R = parseInt(RR, 16) [0–255] G = parseInt(GG, 16) [0–255] B = parseInt(BB, 16) [0–255] RGB → HEX: R.toString(16).padStart(2,'0') + G.toString(16).padStart(2,'0') + B.toString(16).padStart(2,'0')### RGB ↔ HSLNormalise: r = R/255, g = G/255, b = B/255 max = max(r,g,b); min = min(r,g,b); d = max − min L = (max + min) / 2 S = 0 if d = 0 (grey) S = d / (2 − max − min) if L > 0.5 S = d / (max + min) if L ≤ 0.5 H (when max = r) = ((g − b) / d) mod 6 H (when max = g) = (b − r) / d + 2 H (when max = b) = (r − g) / d + 4 H = H / 6 × 360°### RGB ↔ HSVV = max(r,g,b) S = 0 if V = 0; else (max − min) / max H = same formula as HSL### RGB ↔ CMYKK = 1 − max(r, g, b) If K = 1: C = M = Y = 0 Else: C = (1 − r − K) / (1 − K) M = (1 − g − K) / (1 − K) Y = (1 − b − K) / (1 − K) Multiply C, M, Y, K by 100 for percentage values.Worked example — Signal Blue#2F6FED: | Format | Value | |---|---| | HEX |#2F6FED| | RGB |rgb(47, 111, 237)| | HSL |hsl(219°, 83%, 56%)| | HSV |hsv(219°, 80%, 93%)| | CMYK |cmyk(80%, 53%, 0%, 7%)| The HSL reading tells the story: Hue 219° is blue; Saturation 83% means it is a vivid, confident blue (not pastel); Lightness 56% means it is slightly above mid-brightness — bright enough for white text to read on top at sufficient contrast. Note: RGB↔HEX conversion is exact and lossless. RGB↔HSL and RGB↔HSV conversions are also lossless within integer precision. RGB↔CMYK uses the standard formula but introduces a small rounding error (±1%) because CMYK is a device-dependent colour space — actual printed colours vary by printer, paper, and ink brand.