Color Code Converter
Convert between HEX, RGB, HSL, HSV, CMYK, HWB, and Oklch. Generate color palettes, check WCAG contrast, and simulate color blindness — all free, all local.
The quick brown fox
The quick brown fox
Convert between HEX, RGB, HSL, HSV, CMYK, HWB, and Oklch. Generate color palettes, check WCAG contrast, and simulate color blindness — all free, all local.
The quick brown fox
The quick brown fox
Type any color format (HEX, RGB, HSL, HSV, CMYK, HWB, Oklch, or a CSS name like "coral") into the input — or use the native color picker. All formats update instantly.
Switch to Palette & Harmonies to generate complementary, triadic, or analogous colors. Browse 11-step shades/tints and export as CSS variables, Tailwind config, or JSON.
Use the Contrast & A11y tab to verify WCAG AA/AAA compliance. Get automatic fix suggestions and preview how your color pair appears to users with color blindness.
This converter supports HEX (3, 4, 6, and 8-digit with alpha), RGB/RGBA, HSL/HSLA, HSV/HSB, CMYK, HWB (CSS Level 4), Oklch (CSS Level 4), and all 140+ CSS named colors like "coral", "steelblue", or "rebeccapurple". Enter any format and all others update instantly.
Oklch is a perceptually uniform color space introduced in CSS Color Level 4. Unlike HSL, equal steps in Oklch lightness appear equal to the human eye, making it ideal for generating accessible color scales. The "L" is lightness (0–100%), "C" is chroma (color intensity), and "H" is hue angle (0–360°).
WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios between text and background colors. AA requires at least 4.5:1 for normal text and 3:1 for large text (18px+ bold or 24px+). AAA requires 7:1 for normal and 4.5:1 for large text. Meeting these ensures readability for users with visual impairments.
The simulation uses the Machado 2009 mathematical model (peer-reviewed research), which applies transformation matrices to linearized RGB values. It simulates protanopia (red-blind, ~1% of men), deuteranopia (green-blind, ~5% of men), and tritanopia (blue-blind, rare). All processing is local — no image or color data is uploaded anywhere.
Harmonies are generated by rotating the hue angle in HSL space while keeping the same saturation and lightness. Complementary = +180°, Triadic = +120°/+240°, Analogous = ±30°, Split-Complementary = +150°/+210°, Tetradic = +60°/+180°/+240°, Square = +90°/+180°/+270°. Monochromatic varies lightness at fixed hue and saturation.
Yes. This tool runs entirely in your browser. No color values, images, or any data are sent to any server. You can disconnect from the internet after loading the page and everything will continue to work. Recent color history is stored only in your browser's localStorage.