Pinatool

CSS Gradient Generator

Design smooth linear, radial, and conic CSS gradients visually. Fine-tune color stops, angles, and modern OKLab/OKLCH interpolation, then copy ready-to-use CSS code.

Live Preview

Linear Gradient3 color stops

Color Stops

Configure positions and colors across the gradient (min 2, max 8).

%
%
%

Curated Presets

Gradient Controls

°
CSS Color 4 Spec

Modern CSS supports perceptual spaces like OKLab to avoid muddy middle gray zones during transitions.

CSS Output

background-image: linear-gradient(135deg, #67e8f9 0%, #14b8a6 52%, #0f1d3a 100%);

How It Works

1

Choose Gradient Type & Angle

Select Linear, Radial, or Conic mode, enable repeating patterns if needed, and set your direction angle or focal center.

2

Customize Color Stops

Add up to 8 color stops, adjust percentage positions, and switch between standard sRGB and vibrant OKLab/OKLCH blending.

3

Copy Production CSS

Preview the gradient on sample UI cards and copy the complete CSS declaration in one click.

CSS Gradient Generator Key Features

Linear, Radial & Conic Modes

Build directional hero backdrops, radial spotlight glows, conic sweeps, and repeating stripe patterns from one visual editor.

OKLab & OKLCH Blending

Eliminate muddy gray mid-tones between contrasting hues using modern CSS Color 4 perceptual interpolation spaces.

Multi-Stop Color Control & Curated Presets

Arrange up to 8 color stops with exact percentage positions, fine-tune angles or center points, and load curated gradient presets in one click.

Frequently Asked Questions

What types of CSS gradients can I generate?

You can create linear gradients (along a direction line or angle), radial gradients (radiating outward from a center point in circle or ellipse forms), and conic gradients (rotating color transitions around a center point), as well as repeating versions of each type.

How do color stops and positions work?

A color stop marks a specific color and percentage position along the gradient line (from 0% to 100%). Colors interpolate smoothly between adjacent stops, and you can add up to 8 stops to craft multi-tone transitions.

What are modern CSS color interpolation spaces like OKLab and OKLCH?

Traditionally, CSS interpolates gradient colors using sRGB, which can cause dull, muddy "gray zones" in the middle of complementary transitions (such as blue to yellow). By specifying "in oklab" or "in oklch" with CSS Color 4 syntax, transitions remain perceptually uniform, brighter, and more natural.

How do I create sharp stripes or hard color boundaries?

To produce a sharp transition instead of a smooth blend, place two consecutive color stops at the exact same percentage (for example, Stop 1: #3b82f6 at 50%, Stop 2: #ef4444 at 50%). CSS switches colors instantaneously at that threshold.

How do I prevent color banding or muddy midpoints in a CSS gradient?

Switch the Color Interpolation mode to OKLab or OKLCH to maintain consistent perceived lightness across contrasting hues, or add an intermediate color stop near 50% between two complementary colors to guide the blend.