Skip to main content

CSS gradient generator: build linear, radial & conic gradients

Design a gradient visually with a live preview, unlimited color stops, and angle control - then copy production-ready CSS or a Tailwind class. Free, runs in your browser.

  • No signup required
  • Linear, radial & conic
  • CSS & Tailwind output
Free design toolHow it works

Color stops

0%
100%

Presets

background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);

Building a UI from scratch?

We design and build fast, polished web apps and sites - gradients, design systems, and all.

Talk to an engineer about this

CSS gradients are one of the highest-impact, lowest-cost design touches you can add to a site: they're rendered by the browser, weigh nothing, scale to any screen, and never pixelate.

This generator lets you build linear, radial, and conic gradients visually and copy clean code - so you skip the trial-and-error of hand-writing color stops and angles.

What this tool builds

Three gradient types

Linear, radial, and conic - with angle and position control.

Multiple color stops

Add, recolor, and position stops for rich multi-color blends.

CSS & Tailwind output

Copy a standard CSS rule or a Tailwind arbitrary-value class.

Presets & randomizer

Start from a curated preset or shuffle for inspiration.

How to create a CSS gradient

  1. Choose the type - linear, radial, or conic.
  2. Set your colors - add stops, pick colors, and position them; adjust the angle for linear/conic.
  3. Preview live or start from a preset.
  4. Copy the code - CSS or Tailwind - into your stylesheet.

Gradient syntax cheatsheet

CSS gradient syntax by type
TypeExampleBest for
Linearlinear-gradient(90deg, #667eea, #764ba2)Backgrounds, buttons, hero sections
Radialradial-gradient(circle, #fceabb, #f8b500)Spotlights, glows, vignettes
Conicconic-gradient(from 0deg, #ff0080, #7928ca)Color wheels, pie charts, angular accents

For the full specification, see MDN's CSS gradient reference.

CSS gradients vs image gradients

Always reach for CSS first. A CSS gradient adds zero network weight, scales perfectly on any screen including retina, never blurs, and can be animated or re-themed with CSS variables.

An image gradient adds an HTTP request and file size, can pixelate, and is a pain to tweak. Reserve images for textures and effects that CSS genuinely can't reproduce.

Keeping text readable on gradients

A gradient that looks great can still make text unreadable where the background gets light. Check contrast against both the lightest and darkest points of the gradient - aim for a WCAG ratio of at least 4.5:1 for body text.

If a gradient is too busy behind text, add a semi-transparent overlay or shift the text to a calmer area. Verify specific pairs with our brand color & contrast checker.

Related design tools

FAQ

Your questions, answered

Have a question about your project? Ask us on a free call, and we'll give you a straight answer.

What is a CSS gradient generator?
A CSS gradient generator is a visual editor for the linear-gradient, radial-gradient, and conic-gradient functions in CSS. Instead of guessing hex codes and angles, you drag color stops, adjust the direction, and watch a live preview, then copy production-ready CSS - or a Tailwind class - straight into your stylesheet. This one is free and runs entirely in your browser.
What is the difference between linear, radial, and conic gradients?
A linear gradient blends colors along a straight line at an angle you set. A radial gradient blends outward from a center point in a circle or ellipse, which is great for spotlights and glows. A conic gradient sweeps colors around a center point like a clock face, and is used for color wheels, pie-chart effects, and angular accents. This tool generates all three.
How do I create a CSS gradient?
Pick a gradient type, choose two or more color stops, and set each stop's color and position. For linear and conic gradients you also set an angle. The basic syntax is background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);. Copy the generated rule and paste it into the background or background-image property of your element.
How do I add a gradient in Tailwind CSS?
Tailwind has utility classes for simple gradients (bg-gradient-to-r with from-/via-/to- colors), but for full control you can use an arbitrary value like bg-[linear-gradient(90deg,#667eea_0%,#764ba2_100%)] - note that spaces are replaced with underscores. This tool outputs that arbitrary-value class for you in the Tailwind tab.
Can I use more than two colors in a gradient?
Yes. Add as many color stops as you need and position each one along the gradient (0-100%). More stops let you create rich, multi-color transitions, but two or three well-chosen colors usually look cleaner and load the same. This generator supports multiple stops with drag-to-position control.
Is it better to use a CSS gradient or an image?
Prefer CSS gradients. They're rendered by the browser, so they're infinitely scalable, add zero network weight, never pixelate, and can be animated or themed with variables. Image gradients add file size and HTTP requests and can look blurry on high-density screens. Use an image only when you need a texture or effect CSS can't produce.
How do I keep text readable on a gradient background?
Check contrast against the lightest and darkest points of the gradient, not just the average, because text must stay legible across the whole area. Aim for a WCAG contrast ratio of at least 4.5:1 for normal text. A common fix is to overlay a semi-transparent dark or light layer behind the text, or to keep text off the busiest part of the gradient. Verify pairs with our contrast checker.
Is this CSS gradient generator free?
Yes, completely free with no signup. It runs entirely in your browser and you can copy the CSS or Tailwind output as many times as you like.
Linear vs radial vs conic?
Linear blends along a line, radial blends outward from a center, conic sweeps around a center like a clock face.
Can I use more than two colors?
Yes - add multiple stops and position each one. Two or three usually look cleanest.
CSS gradient or image?
CSS - it's weightless, scalable, and editable. Use images only for effects CSS can't produce.
How do I keep text readable?
Check contrast against the lightest and darkest points; aim for 4.5:1, and add an overlay if needed.
Is it free?
Yes - free, no signup, runs entirely in your browser.

Tell us about your project

Tell us what you're building, when you need it, and what's in the way. A senior engineer will reply within one business day with honest next steps, even if that means we're not the right fit.

  • Your project is led by a senior engineer, not a junior and not AI on its own
  • AI speeds up the build. Every change is reviewed and tested before it ships
  • Best for MVPs, SaaS products, automation, and fixing apps that keep breaking
Browse all design tools