Migrate Tailwind v3 Colors to v4
Paste legacy tailwind.config.js objects or CSS variables to emit production-ready Tailwind CSS v4 @theme blocks in oklch().
@theme OKLCH
- 100% browser-local
- Zero server transfers
- CSS Color 4 precision
or drop a color string, CSS/JSON snippet, or file here · Ctrl V to paste · or drop CSS/JSON config · Ctrl+V to paste directly
Instant Before & After Specimen
7 tokens → @theme OKLCH/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
extend: {
colors: {
brand: {
DEFAULT: "#2563EB",
50: "#EFF6FF",
500: "#3B82F6",
600: "#2563EB",
900: "#1E3A8A"
},
accent: "#10B981",
surface: "#0F172A"
}
}
}
};@theme {
--color-brand: oklch(0.5461 0.2152 262.88);
--color-brand-50: oklch(0.9701 0.0141 254.6);
--color-brand-500: oklch(0.6231 0.188 259.81);
--color-brand-600: oklch(0.5461 0.2152 262.88);
--color-brand-900: oklch(0.3791 0.1378 265.52);
--color-accent: oklch(0.6959 0.1491 162.48);
--color-surface: oklch(0.2077 0.0398 265.75);
}How to use Tailwind v3 → v4 OKLCH
Tailwind v3 → v4 OKLCH — cleanly inside your local browser with zero server transfers.
- Paste code or drop configPaste CSS variables, Tailwind configs, DTCG JSON, or multi-line Hex lists — or drop a local file.
- Adjust conversion formatSelect target syntax (Tailwind v4 @theme, CSS vars, JSON, or ASE) and source-comment options.
- Copy, chain, or exportCopy ready CSS/JSON snippets, download binary swatch files, or pipe directly to related Colr tools.
Format specs:OKLCH (.css / .json)
Frequently asked questions
Does it accept JavaScript object syntax as well as CSS?
Yes — paste theme.extend.colors JS blocks, nested 50–950 maps, or CSS :root variables cleanly.
Can I keep an inline hex comment beside each converted oklch line?
Yes — toggle Source Hex Comments in options for easy Git pull-request review.