Back to Hub

Free Online Gradient Generator

Build stunning CSS gradients visually — copy the code in one click.

linear-gradient(135deg, ...)

Presets

CSS Code

The Ultimate Guide to Modern CSS Gradients

CSS gradients allow developers and designers to generate rich, mathematically smooth transitions between two or more colors without loading heavy raster graphics. Because gradients are synthesized directly by the client's GPU, they scale infinitely across high-DPI retina displays, minimize network HTTP requests, and significantly accelerate Core Web Vitals (LCP and CLS).

Our CSS Gradient Generator provides visual controls for linear directional angles, radial elliptical contours, and conic rotational sweeps with multi-stop color pickers, opacity controls, and instantaneous cross-browser CSS code generation.

1. The Three Primary Types of CSS Gradients

CSS Level 3 Image Values define three fundamental mathematical models for color blending:

2. CSS Gradient Types & Syntax Matrix

Gradient Function Core Syntax Pattern Geometric Motion Common UI Applications
linear-gradient() linear-gradient(135deg, #06b6d4, #d946ef) 1D Straight Line Vector Hero backgrounds, CTA buttons, text clipping, and card borders.
radial-gradient() radial-gradient(circle at 50% 50%, #3b82f6, transparent) 2D Concentric Expansion Spotlights, ambient glow overlays, planetary orbs, and vignettes.
conic-gradient() conic-gradient(from 0deg, #f43f5e, #8b5cf6, #f43f5e) 360° Polar Angle Sweep Rotating border beams, pie/donut charts, and radar scanners.
repeating-linear-gradient() repeating-linear-gradient(45deg, #000 0 10px, #fff 10px 20px) Periodic Tiling Vector Striped hazard ribbons, progress bars, and retro scanlines.
repeating-radial-gradient() repeating-radial-gradient(circle, #06b6d4 0 5px, transparent 5px 10px) Periodic Concentric Rings Sonar ripples, bullseye patterns, and optical illusions.

3. Advanced CSS Gradient Techniques

Frequently Asked Questions

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

linear-gradient(angle, color-stop1, color-stop2) creates a transition along a straight vector. radial-gradient(shape at position, color-stop1, color-stop2) radiates outward from a center point in circular or elliptical contours. conic-gradient(from angle at position, color-stop1, color-stop2) rotates colors 360 degrees around a central origin point like a color wheel.

How do color stop percentages work in CSS gradients?

Color stop percentages (e.g., #06b6d4 0%, #d946ef 100%) define where each color is at 100% pure saturation along the gradient vector. Setting two different colors at the exact same percentage (e.g., #fff 50%, #000 50%) creates a sharp, hard-edge dividing line without smooth color interpolation.

Are CSS gradients performant for modern web design?

Yes. Native CSS gradients are computed directly on the client's GPU via the browser rendering engine, resulting in zero network bandwidth consumption, crisp pixel rendering across all retina screen resolutions, and significantly faster LCP (Largest Contentful Paint) times than raster image backgrounds.

Can I use alpha transparency (RGBA / HSLA) in gradient color stops?

Yes. You can use RGBA (rgba(6, 182, 212, 0.5)) or HSLA to create translucent overlays, glassmorphism card backdrops, or fade-to-transparent gradient masks for text and hero images.

How do I apply a gradient to text in CSS?

Apply background: linear-gradient(...); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; to the text element. This clips the background gradient strictly to the glyph silhouettes.

×
× Close