Skip to main content

CSS Gradient Generator

Runs locally

Design linear, radial, conic and OKLCH gradients with export to CSS, Tailwind, SwiftUI and Compose.

What is CSS Gradient Generator?

Build linear, radial, conic, and repeating gradients with unlimited color stops, stop positions, angle dial, sRGB vs OKLCH interpolation, and layered mesh presets. Export production code for CSS, Tailwind, SwiftUI LinearGradient, Jetpack Compose Brush, and Android XML <gradient>.

How to use CSS Gradient Generator

  1. Step 1

    Choose Linear, Radial, Conic, or Repeating gradient mode and optional OKLCH color interpolation.

  2. Step 2

    Add, drag, reorder, or edit color stops and angle.

  3. Step 3

    Pick from curated presets or customize a multi-layer mesh backdrop.

  4. Step 4

    Copy output for CSS, Tailwind, SwiftUI, Jetpack Compose, or Android XML.

Features

  • Linear, radial, conic, and repeating gradient modes
  • Multi-stop editor with percentage stop positions and add/remove controls
  • Color interpolation space selector: sRGB vs perceptual OKLCH (avoids muddy midtones)
  • Layered mesh gradient mode and curated presets
  • Multi-platform export: CSS, Tailwind CSS, SwiftUI LinearGradient, Compose Brush, Android XML
  • Runs locally in your browser

Example

Input

135deg, #2ee6a6 0%, #3b82f6 100% (oklch)

Output

background: linear-gradient(135deg in oklch, #2ee6a6 0%, #3b82f6 100%);

Uses OKLCH interpolation for smoother hue transitions without gray dead zones.

Frequently asked questions

Why use `in oklch` interpolation?

Interpolating in OKLCH avoids muddy gray midpoints that often appear in sRGB linear gradients.

Can I export to SwiftUI and Jetpack Compose?

Yes. Switch the output target to SwiftUI or Jetpack Compose to copy native gradient code.

Are repeating gradients supported?

Yes, toggle Repeating mode to create striped or radial ring patterns.

Can I copy Tailwind arbitrary gradient classes?

Yes, Tailwind export generates ready-to-use `bg-[...]` utility classes.