PaletteGen
Theme

CSS Gradient Generator

This gradient generator builds linear, radial, and conic CSS gradients visually, with 2 to 8 color stops. Copy CSS or Tailwind output instantly.

By , PaletteGen

Angle135°

OKLab and OKLCH often give smoother blends than sRGB. Older browsers ignore them, so the full declaration keeps an sRGB fallback. PNG and SVG exports always use sRGB.

CSS value
Full declaration with fallback
Tailwind arbitrary value

How to use this generator

  1. Choose Linear, Radial, or Conic from the tabs above.
  2. Adjust each color stop's color and position, or add up to 8 stops total with Add stop.
  3. Set the angle (Linear/Conic) or the shape and center position (Radial).
  4. Copy the output that matches your workflow: raw CSS value, a full declaration with a solid-color fallback, or a Tailwind arbitrary-value class.

Linear, radial, and conic: when to use each

The three CSS gradient types
TypeHow it blendsGood for
LinearAlong a straight line at a chosen angleBackgrounds and buttons; the most common type
RadialOutward from a center pointSpotlight effects and soft vignettes
ConicAround a center point, like a color wheelPie-chart-style visuals and unusual background effects that linear and radial can't produce

Check before you ship

Text over a gradient. A gradient is many background colors at once, so one contrast check is not enough. Check your text color against the lightest stop and the darkest stop, and look at the middle too. If the worst point fails, darken the stops, put a solid panel behind the text, or move the text off the gradient. The contrast checker takes any two colors.

Blend space. The two bars below use the same two stops, blue #2563EB to yellow #FACC15. The top bar blends in sRGB, which is the default. The bottom bar blends in OKLCH. In sRGB the middle of a blue to yellow gradient tends to turn gray and dull, while OKLCH keeps it more colorful. Pick the one that suits your design with the Blend colors in control above.

sRGB (default)OKLCH

Older browsers ignore the OKLCH line, so both bars look the same there. That is why the full declaration from this tool keeps an sRGB line first. This is the CSS behind the bars:

background: linear-gradient(90deg, #2563EB, #FACC15);
background: linear-gradient(in oklch 90deg, #2563EB, #FACC15);

Building a gradient for a site with both light and dark themes? A gradient tuned for one usually looks broken on the other. See building dark-mode-aware gradients for how to use light-dark() with gradients, including the fallback for older browsers.

Frequently Asked Questions

What's the difference between linear, radial, and conic gradients?

Linear transitions along a straight line at an angle. Radial transitions outward from a center point. Conic sweeps around a center point like a color wheel.

Why is the angle control disabled for radial gradients?

Radial gradients radiate outward from a center point in all directions at once, so a single angle doesn't apply. Shape and center position control the effect instead.

Can I use this gradient as a background for text?

Yes, using background-clip: text together with color: transparent on the text element, with the gradient set as its background.

Does this work in all browsers?

Linear and radial gradients have very broad support across modern browsers. Conic gradients are supported in all current evergreen browsers but are the newest of the three, so verify support if you need to target older browser versions specifically.

Sources

About this page

This generator is built around the linear, radial and conic gradient syntax in MDN's gradient reference. Browsers can change how they handle gradients, so the review date below is the last time the page was checked against that reference. Last reviewed: October 20, 2026.