Tailwind Gradient Generator
Pick colours straight from the Tailwind palette and get the gradient classes — v4 or v3 syntax, backgrounds or gradient text, with a preview that blends colours the way Tailwind does.
Tailwind gradients from the real palette
Click from, via or to and pick any colour and shade from the Tailwind palette, from slate-50 to rose-950. The tool writes the classes, such as bg-linear-to-r from-indigo-500 via-purple-500 to-pink-500. Need a brand colour that isn’t in the palette? Type a hex code and you get an arbitrary value like from-[#7b5cff]. Add stop positions (from-10%, to-90%) to control where each colour sits.
Tailwind v4 and v3
Tailwind v4 renamed the utilities: bg-gradient-to-r became bg-linear-to-r. It also added any angle (bg-linear-45), radial and conic gradients (bg-radial, bg-conic-180), and blend modifiers like /oklch and /longer. Switch between v4 and v3 to get the right syntax for your project. The preview uses each version’s actual colour values, which are OKLCH in v4 and hex in v3, so a v4 gradient looks the way v4 renders it.
Why v4 gradients look smoother
Tailwind v4 blends gradient colours in the OKLab colour space by default, which avoids the grey, muddy middle that sRGB gives between colours like blue and yellow. The Blend menu shows the difference: sRGB matches v3, OKLCH keeps colours more vivid, and Longer hue goes the long way round the colour wheel for a rainbow.
Gradient text in Tailwind
Switch to Text to get gradient text. The tool adds bg-clip-text text-transparent to the gradient classes, and the HTML box gives you a ready heading. For effects beyond what classes can do, like animated text or outlines, use the Gradient Text Generator. For any gradient as plain CSS, there’s the Gradient Generator.
