CSS Gradient Generator Guide

Create linear, radial and conic CSS gradients with live preview. This guide covers gradient syntax, colour stops, angles and common use cases.

Generate CSS gradients with live preview and 15+ presets — copy code instantly.

Open CSS Gradient Generator →

CSS Gradient Types

TypeSyntaxBest For
Linearlinear-gradient(angle, colors)Backgrounds, buttons, hero sections
Radialradial-gradient(shape at pos, colors)Spotlight, glow effects
Conicconic-gradient(from angle, colors)Pie charts, colour wheels

CSS Gradient Syntax Examples

/* Linear: 135° diagonal purple to blue */ background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
/* Radial: circle from centre */ background: radial-gradient(circle at center, #a855f7 0%, #0f0f1a 100%);
/* Three colour stops */ background: linear-gradient(90deg, #f97316 0%, #a855f7 50%, #3b82f6 100%);
/* Transparent overlay for image text */ background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0));

Tips for Better Gradients

Frequently Asked Questions

What is the CSS gradient syntax?

Linear: background: linear-gradient(angle, color1, color2). Radial: radial-gradient(shape at position, colors). Conic: conic-gradient(from angle, colors). Example: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%) = diagonal purple to blue.

What is the difference between linear, radial and conic gradients?

Linear: straight-line transition at an angle. Radial: radiates from a centre point. Conic: rotates around a centre. Use linear for backgrounds, radial for glows, conic for pie charts.

How do I make a transparent gradient?

Use rgba: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0)) fades from 80% black to transparent. Commonly used for image text overlays.