Color Converter
Convert colors between HEX, RGB, HSL, HSV, CMYK and OKLCH, pick colors visually and generate shades, tints and color harmonies.
Formats — edit any field
WCAG 2 contrast
As a background, use black text. AA needs 4.5:1 (3:1 for large text), AAA needs 7:1.
Tints & shades (10% steps)
Color harmonies
Click any swatch to make it the current color.
What is the Color Converter?
The Color Converter translates a color between every format a web or print designer needs: HEX (3, 4, 6 and 8 digits), RGB and RGBA, HSL and HSLA, HSV/HSB, CMYK, the CSS Color 4 OKLCH space and the 148 CSS named colors. Every field is editable — type or paste a value into any of them (with or without the rgb()/hsl() wrapper, comma or space syntax, percentages, deg/turn hue units) and all other formats update instantly.
Values are stored internally with full floating-point precision, so switching between formats never drifts: a color copied out of any field and pasted back in maps to exactly the same 8-bit color. OKLCH colors outside the sRGB gamut are brought into range with the CSS Color 4 gamut-mapping method and flagged.
Beyond conversion you get a native color picker, an opacity slider, WCAG 2 contrast ratios against white and black, a 10%-step tint and shade scale you can copy as CSS custom properties, and complementary, analogous, triadic, split-complementary and tetradic harmonies. Everything runs locally in your browser.
Frequently asked questions
- What is the difference between HEX and RGB?
- They describe the same sRGB color. RGB lists red, green and blue as 0–255 numbers, while HEX writes the same three bytes in base 16 (#3B82F6 = rgb(59, 130, 246)). An optional fourth byte (#RRGGBBAA) or rgba() adds opacity.
- Why use HSL or OKLCH instead of HEX?
- HSL and OKLCH separate hue from lightness and saturation/chroma, so building hover states or themes is a matter of changing one number. OKLCH is perceptually uniform: two colors with the same L really look equally light, which HSL cannot guarantee. All modern browsers support oklch() in CSS.
- Is the CMYK value print-accurate?
- No. Without an ICC color profile any RGB-to-CMYK conversion is an approximation. The formula used here is the standard device-independent one; for professional print work, convert with your printer's profile in a tool like Photoshop or Affinity.
- Can I convert transparency (alpha)?
- Yes. Alpha is read from 4- and 8-digit HEX, rgba(), hsla(), oklch(… / a) and the opacity slider, and written back to HEX8, rgba, hsla and oklch. HSV and CMYK have no alpha channel, so they show only the color part.
- How is the WCAG contrast ratio calculated?
- Using the WCAG 2 relative-luminance formula. Translucent colors are first blended over the white or black background. Normal text needs 4.5:1 for AA and 7:1 for AAA; large text (24px, or 18.66px bold) needs 3:1 for AA.
- How do tints, shades and harmonies work?
- Tints mix the color with white and shades mix it with black in 10% steps, like Sass mix(). Harmonies rotate the hue in HSL space — 180° for complementary, ±30° analogous, 120° triadic, 150°/210° split-complementary and 90° steps for tetradic.
- Is anything sent to a server?
- No. All conversions happen in JavaScript in your browser; no color you enter is uploaded or stored.
Related tools
- Image to WebPConvert PNG and JPEG images to lightweight WebP with adjustable quality, batch processing and ZIP download — no uploads.
- Image ResizerResize and compress JPG, PNG and WebP images by pixels or percentage, keep the aspect ratio and download in bulk. Nothing is uploaded.
- SVG OptimizerMinify and clean SVG files with SVGO directly in your browser. Compare sizes, preview the result and download the optimized SVG.
- Favicon GeneratorGenerate a complete favicon set (multi-size ICO, PNGs, Apple touch icon and web manifest) from an image, a letter or an emoji — entirely in your browser.
- Contrast CheckerCheck the contrast ratio between text and background colors against WCAG 2.2 AA and AAA, with live preview and suggested fixes.
- CSS Gradient GeneratorDesign linear, radial and conic CSS gradients with multiple color stops and copy production-ready CSS or Tailwind code.