Color Format Converter — HEX, RGB, HSL, OKLCH, CMYK, Tailwind & More
Paste any color in any format — HEX, rgb(), hsl(), oklch(), CSS named color, or even a Tailwind class like blue-500 — and get all 10 formats instantly. Includes bulk batch converter, nearest Tailwind token with ΔE matching, CSS/SCSS/Tailwind snippets, conversion math explanation, and persistent history.
Color Format Converter
🔒 Private — no serverRate this tool
How useful was the Color Format Converter?
Convert any color format in seconds — paste and go
Smart auto-detection, 10 simultaneous outputs, Tailwind matching, bulk convert, CSS snippets — all free.
Paste any format
Type or paste a color in any format — the tool auto-detects it instantly. Works with #2563EB, rgb(37,99,235), hsl(221 83% 53%), oklch(0.55 0.22 262), oklab(), hwb(), any of the 140 CSS named colors like tomato or royalblue, and even Tailwind class names like blue-500 or emerald-400. The detected format is shown below the input.
Copy any output format
All 10 format outputs update simultaneously: HEX, RGB, HSL, HSV, OKLCH, OKLab, CMYK, HWB, CSS color(), and CSS variable. Click any row to copy the value, or use the Copy button on the right. The nearest Tailwind color token is shown with Delta-E distance — click any utility class (bg-, text-, border-) to copy it directly.
Use code snippets
Switch between 4 ready-to-use code snippets: CSS custom property (:root block), Tailwind theme.extend.colors config, SCSS variable, and JavaScript color object. All use the CSS named color as a semantic variable name when available. Click Copy to copy the complete snippet. Enable Show math to see the step-by-step conversion formula.
Bulk convert a list
Switch to Bulk Convert mode and paste one color per line — any mix of formats works. Choose your target output format (HEX, RGB, HSL, OKLCH, etc.) and click Convert all. Each input line is parsed and converted independently. Copy all results at once as a text list. Great for converting design tokens, brand palettes, or CSS variable files between formats.
Frequently asked questions
Color format differences, OKLCH, Tailwind matching, bulk conversion, and when to use each format.
rgb(255, 87, 51), rgba(255,87,51,0.5), or space-separated modern CSS syntax rgb(255 87 51). HSL / HSLA — hsl(14, 100%, 60%), hsla(14,100%,60%,0.8), or modern hsl(14 100% 60%). OKLCH — oklch(0.63 0.26 29) or oklch(63% 0.26 29). OKLab — oklab(0.63 0.19 0.16). HWB — hwb(14 0% 0%). CSS named colors — all 140 CSS4 named colors by name (e.g., tomato, royalblue, cornflowerblue). Tailwind CSS classes — any Tailwind 3.x color token in the format color-shade (e.g., blue-500, emerald-400, rose-600). The tool normalizes all formats through RGB as an intermediate step, then converts to all output formats.blue-600), the actual hex value of that Tailwind color, the ΔE distance (lower = closer match — under 5 means very close, over 15 means the match is approximate), and ready-to-copy utility classes in four variants: bg-blue-600, text-blue-600, border-blue-600, and ring-blue-600. This is useful for designers who want to find the nearest standard Tailwind color for a custom brand color, and for developers who want to use Tailwind classes rather than arbitrary values.hsl(60,100%,50%) (yellow) looks much brighter than hsl(240,100%,50%) (blue) even though both have L=50%. OKLCH (OK Lightness, Chroma, Hue) is a perceptually uniform color space. "Perceptually uniform" means equal numerical steps correspond to equal perceived visual differences regardless of hue. In OKLCH, if you change only the L value, the color genuinely looks brighter or darker by a consistent amount across all hues. This makes OKLCH better for: generating tint/shade scales (consistent perceived brightness at each step), creating color gradients without muddy midpoints, and building accessible color systems where lightness has predictable contrast behavior. OKLCH is now natively supported in all modern browsers as part of CSS Color Level 4.hwb(0 0% 0%) is pure red, hwb(0 50% 0%) is a light pink (white mixed in), and hwb(0 0% 50%) is a dark red. HWB is now part of the CSS Color Level 4 specification and is supported in modern browsers: color: hwb(14 0% 0%);. It's particularly useful for UI design because "lighter/darker" adjustments are more predictable than HSL.LazyTools vs other color format converters
How we compare on features designers and developers actually need every day.
| Feature | LazyTools ✦ | colorconvert.net | nocodevista.com | convertingcolors.com | MDN converter |
|---|---|---|---|---|---|
| HEX / RGB / HSL / HSV output | ✓ | ✓ | ✓ | ✓ | ✓ |
| OKLCH + OKLab output | ✓ | ✓ | – | – | ✓ |
| CMYK + HWB output | ✓ | ✓ | CMYK only | ✓ | – |
| Smart auto-detect input format | ✓ | – | – | – | ✓ |
| Tailwind class as input | ✓ | – | – | – | – |
| Nearest Tailwind token + ΔE | ✓ | – | – | – | – |
| Bulk / batch converter (free) | ✓ | Paywalled | – | – | – |
| CSS / SCSS / Tailwind / JS snippets | ✓ all 4 | ✓ some | CSS + SCSS | – | – |
| Conversion math shown | ✓ | – | – | – | – |
| WCAG contrast badges inline | ✓ | – | – | – | – |
| Color history (localStorage) | ✓ 20 | – | – | – | – |
| Copy all formats at once | ✓ | – | – | – | – |
| 100% free, no account | ✓ | Partial | ✓ | ✓ | ✓ |
Other color tools you might find useful
Color Picker Online
Visual 2D HSL picker. 9 format outputs, WCAG badges, harmony panel, history.
Use tool →Color Contrast Checker
All 5 WCAG 2.1 criteria, APCA score, auto-fix suggestions, bulk pair mode.
Use tool →Tint & Shade Generator
Generate full OKLCH color scales with WCAG badges, Tailwind 50–950 steps.
Use tool →Color Palette Generator
8 harmony modes, interactive wheel, WCAG contrast matrix, 5 export formats.
Use tool →Image Colour Extractor
Extract up to 20 dominant colors from any image. WCAG matrix, 7 export formats.
Use tool →CSS Gradient Generator
Linear, radial, conic, mesh gradients. OKLCH interpolation, 30+ presets.
Use tool →Color Blindness Simulator
10 CVD types, drag split view, difference map, palette checker mode.
Use tool →CSS Box Shadow Generator
Light source dial, 20+ presets, elevation scale, hover state export.
Use tool →