Tailwind CSS v4 Mesh Gradient Generator

Enter a background colour and a few accent colours and get a ready-to-paste Tailwind class for a soft mesh gradient, plus the same thing as plain CSS.

Use the tool

Why this tool exists

Tailwind has no mesh gradient utility, so people hand-write several stacked radial-gradient layers and then fight with underscores in the arbitrary value. This tool lays out one radial blob per accent colour at seeded positions on top of your background colour, and prints a single class with the spaces already escaped as underscores.

The class was checked by compiling it with the Tailwind v4 compiler, which produced the expected background-image. The same seed always gives the same layout, so a design can be reproduced, and changing the seed shuffles the blob positions. The spread value controls how far each colour reaches before it fades to transparent. Colours must be hex values; for other formats convert them first.

How to use it

  1. Enter colours as hex: the first is the background, the rest become blobs.
  2. Choose a seed and a blob spread.
  3. Check the preview.
  4. Copy the Tailwind class or the plain CSS.

Frequently asked questions

Does it need Tailwind v4?

The class uses arbitrary values, which work in Tailwind v3.1 and later as well as v4. Tailwind v4 is what it was tested with.

How many colours can I use?

One background plus up to eight blobs.

Can I get the same result later?

Yes. The positions come from a seeded generator, so the same colours, seed and spread always give identical output.

Why hex colours only?

Keeping one colour syntax keeps the escaped class unambiguous. Convert named, rgb or oklch colours to hex first with the colour converter.