CSS Gradient Generator: Linear, Radial, Mesh & Tailwind

CSS Gradient Generator: Linear, Radial, Mesh & Tailwind

Build linear, radial, conic or mesh CSS gradients with a live preview and copy the code as CSS or Tailwind. oklch mode, 10 presets and PNG export.

Updated November 2026

Reviewed by Rafael Duarte

LIVE PREVIEW
Color Stops
Selected Color
#
Opacity 100%
Pos: 0%

⚙ Configuration

Gradient Type

Angle

deg

Color Interpolation

Generated Snippet
1/5
background
background: linear-gradient(135deg, #197FE6 0%, #0EA5E9 100%);
Presets
Landing Page Preview
relicario.app
Media Tracker para o Brasil

Organize seus animes, séries e filmes em um só lugar.

Chega de três apps diferentes. Media tracker 100% em português, com alertas automáticos, feed social e salas de discussão.

+2.400 já na fila de espera

How to use the CSS gradient generator

Four gradient types, optional perceptual interpolation

1. Pick a gradient type

Linear, radial, conic or mesh, or start from one of the 10 presets. The live preview updates as you go.

2. Edit the color stops

In Color Stops, drag the handles along the bar, change each stop's color and opacity, and click Add for more. For linear and conic gradients, type the angle in degrees, click a point on the angle wheel or use the 0°, 45°, 90°, 135°, 180° and 270° shortcuts.

3. Copy the snippet

Use the arrows in Generated Snippet to switch formats. Linear gradients offer background, background-image, oklch, Tailwind v3 and Tailwind v4; radial and conic offer only the first two; mesh comes out as a single CSS block. Shift+Enter also copies when focus isn't in a field.

What this CSS gradient generator does

All four gradient types, including a synthesized mesh gradient

oklch interpolation mode

Perceptually uniform color blending — removes the gray "dead zone" that appears between complementary hues in plain sRGB gradients.

Mesh gradient generator

Built from stacked radial-gradient() layers over a base background-color for the "aurora" look. Each stop becomes one layer at one of 6 fixed positions, and the mesh doesn't use the oklch mode.

10 built-in presets

Start from Ocean, Sunset, Aurora, Rainbow and six more instead of picking stops from scratch.

Tailwind v3 and v4 export

Ready-to-paste classes for linear gradients. Tailwind v4 keeps every stop at any angle; Tailwind v3 uses up to 3 stops and only maps multiples of 45° to its direction classes.

Saved presets and PNG export

Save Preset keeps up to 20 combinations in your browser under My Presets, and Export PNG downloads the current gradient as an 800×600 image.

The four CSS gradient types

When to reach for each one

Type
Typical use
Linear
Hero backgrounds, card headers, buttons
Radial
Spotlight and glow effects
Conic
Pie-chart-style progress indicators
Mesh
"Aurora" effect on modern SaaS backgrounds

When you'll reach for this tool

The scenarios that come up most often

Hero section backgrounds

Mesh or linear gradients add depth in a few lines of CSS, with no background image to download.

Button hover states

A subtle linear gradient adds visual richness while a solid background-color still works as a fallback.

Glassmorphism overlays

Radial gradients with opacity stops give glassmorphism panels their translucent base — pair them with backdrop-filter: blur() for the frosted-glass look.

Gradient text

Copy the background line for a linear gradient, then add -webkit-background-clip: text, background-clip: text and color: transparent to the heading so the gradient shows through the letters.

Common CSS gradient mistakes

Muddy gradient between complementary colors

Plain sRGB interpolation creates a grayish "dead zone" between colors like blue and yellow — switch to oklch mode to avoid it.

Expecting a native mesh-gradient() function

There's no such CSS function — mesh gradients are synthesized by layering multiple radial-gradient() calls.

Forgetting -webkit-background-clip for gradient text

Write both -webkit-background-clip: text and background-clip: text, and set color: transparent. If the text keeps its color, it paints over the gradient and the effect never shows.

Why use this CSS gradient generator

It supports perceptual color interpolation via oklch for linear, radial and conic gradients, and linear gradients export straight to Tailwind v3 and v4 syntax, with the snippet ready to copy.

The mesh mode builds the "aurora" look popular in SaaS design without stacking radial-gradient() layers by hand: up to 6 stops each get their own position, over a base color taken from the last stop.

sRGB vs. oklch

Why the color interpolation space matters

sRGB (default)
oklch
Between complementary colors
creates a grayish "dead zone"
keeps brightness and saturation uniform
CSS syntax
linear-gradient(...)
linear-gradient(in oklch, ...)
Visual result
can look muddy in the middle
vibrant and clean across the transition

Frequently asked questions

It's a tool that builds ready-to-paste CSS gradient code — you pick colors, a gradient type and a few options, and it outputs valid CSS you can drop straight into a stylesheet.

References

Related Tools