Home › Tools › CSS Gradient Generator
🎨 Free Tool · No Signup

Free CSS Gradient Generator

Create linear, radial and conic CSS gradients visually with a live preview — then copy ready-to-use CSS or Tailwind classes instantly.

Build Your Gradient

135°
—
—

🌈 Preset Gradients


Linear, Radial and Conic Gradients Explained

CSS supports three gradient types, each transitioning colors along a different geometry.

➡️

Linear

Colors transition along a straight line at any angle — the most common type, used for buttons, headers and backgrounds.

⭕

Radial

Colors radiate outward from a center point in a circle or ellipse — good for spotlight and glow effects.

🌀

Conic

Colors rotate around a center point by angle, like a color wheel or pie chart — useful for loaders and dials.

Understanding Gradient Angles

Linear gradient angles follow a clockwise convention starting from the bottom: 0deg points from bottom to top, 90deg from left to right, 180deg from top to bottom, and 270deg from right to left.

Example
background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
💡 135deg (diagonal, top-left to bottom-right) is one of the most widely used angles in modern UI design — it reads naturally and works well for both light and dark themes.

The Gradient Text Effect

You can apply a gradient directly to text by setting it as a background image on the text element, then clipping the background to the text shape and making the actual text color transparent — a popular technique for headlines and logos.

Gradient Text CSS
.gradient-text { background-image: linear-gradient(135deg, #ff6b6b, #4ecdc4); background-clip: text; -webkit-background-clip: text; color: transparent; }

Need to check text/background contrast too?

Verify any two colors meet WCAG AA/AAA accessibility standards.

Open Color Contrast Checker →

Using Gradients with Tailwind CSS

Tailwind ships built-in gradient utilities (bg-gradient-to-r, from-*, to-*) that work well for simple two-color linear gradients, but they don't cover radial, conic, or multi-stop gradients with custom angles. For anything beyond the basics, Tailwind's arbitrary value syntax lets you drop any valid CSS gradient straight into a utility class:

Arbitrary Value Example
<div class="bg-[linear-gradient(135deg,#ff6b6b_0%,#4ecdc4_100%)]"></div>

Spaces inside the arbitrary value are written as underscores — this generator's Tailwind output handles that conversion for you automatically.

5 Common Gradient Mistakes to Avoid

Mistake 1 — Using colors with too little contrast between stops
Two similar-brightness colors next to each other can look muddy or banded rather than smooth — pick stops with a clear light/dark or hue difference.
Mistake 2 — Forgetting text needs sufficient contrast against a gradient background
A gradient background can pass contrast checks at one end and fail at the other — test text readability across the entire gradient, not just one spot.
Mistake 3 — Overusing more than 3-4 color stops
Gradients with too many stops often look like a messy rainbow rather than an intentional design choice — 2-3 well-chosen colors are usually more effective.
Mistake 4 — Forgetting the background-clip prefix for text gradients
The gradient-text technique still benefits from including both background-clip: text and -webkit-background-clip: text for the widest compatibility.
Mistake 5 — Not testing gradients in both light and dark contexts
A gradient designed against a white page background can look completely different — sometimes worse — against a dark-mode background; preview both if your site supports both themes.

Frequently Asked Questions

Linear transitions colors along a straight line at an angle. Radial transitions outward from a center point circularly or elliptically. Conic rotates colors around a center point by angle, like a color wheel.

Any number — there's no hard limit in the specification. Each stop defines a color and optionally a position along the gradient.

No. All modern browsers have supported unprefixed linear-gradient, radial-gradient, and conic-gradient syntax for years.

Yes — set it as background-image, then apply background-clip: text and color: transparent so the text itself displays the gradient.

0deg is bottom-to-top, 90deg is left-to-right, 180deg is top-to-bottom, and 270deg is right-to-left. 135deg (diagonal) is a very commonly used angle in modern design.

This tool generates a Tailwind-compatible bg-[...] arbitrary value class, letting you apply any valid CSS gradient directly as a utility class with JIT mode enabled.

No. All generation and preview rendering happens instantly in your browser using CSS. Nothing is uploaded, logged, or stored on any server.

More Free Tools on ToolLoom

📅 August 2026 · Written by the ToolLoom Team · Reviewed for accuracy August 2026. Found an error? Email contact@toolloom.in