Color Converter
Convert colors between HEX, RGB, RGBA, HSL, HSV, and CMYK. Pick any color and instantly see all format representations with one-click copy.
Conversion Formulas
G = parseInt(hex[3..4], 16)
B = parseInt(hex[5..6], 16)
max = max(R',G',B'), min = min(R',G',B')
L = (max + min) / 2
S = (max - min) / (1 - |2L - 1|)
H = 60 x sector based on which channel is max
Frequently Asked Questions
HSL stands for Hue, Saturation, and Lightness. Hue is the color angle (0–360°), Saturation is how vivid the color is (0–100%), and Lightness is how light or dark it is (0% = black, 50% = pure color, 100% = white). HSL is often more intuitive for designers than RGB.
CMYK stands for Cyan, Magenta, Yellow, and Key (Black). It is a subtractive color model used in color printing. Unlike RGB (which adds light), CMYK subtracts light — inks absorb certain wavelengths. Printers use CMYK inks to produce a wide range of colors on paper.
Split the hex code into three pairs: the first pair is Red, second Green, third Blue. Convert each pair from base-16 to base-10. For example, #3b82f6 → R=59 (0x3b), G=130 (0x82), B=246 (0xf6).
The WCAG (Web Content Accessibility Guidelines) contrast ratio measures the relative luminance difference between two colors. A ratio of 4.5:1 passes AA for normal text, and 7:1 passes AAA. For large text (18pt+), AA requires 3:1. Always ensure sufficient contrast for readability.
Related Calculators
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from any text.
Binary Converter
Convert numbers between binary, decimal, octal, and hexadecimal.
Hex Converter
Convert between hexadecimal, decimal, binary, and text (ASCII/UTF-8).