What Can a CSS Gradient Generator Do?
A modern CSS gradient generator removes the need to manually calculate color stops, angles, and positions. With a visual tool, you:
- Pick colors with a color picker (or enter exact HEX/RGB values)
- Drag color stops to adjust positions
- Change the angle or direction visually
- Preview the result in real time
- Copy the CSS output in one click
TooStamply's gradient generator goes further — it supports 5 gradient types, OKLCH color interpolation, easing curves, and exports to CSS, Tailwind v3, Tailwind v4, SCSS, SVG, and PNG.
The 5 Types of CSS Gradients
1. Linear Gradient
The most common type. Colors transition in a straight line.
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
Parameters:
- Angle: 0deg (top to bottom), 90deg (left to right), 135deg (diagonal)
- Color stops: two or more colors with optional positions
Use cases: Button backgrounds, hero sections, card backgrounds, text gradients.
2. Radial Gradient
Colors transition outward from a central point in a circular or elliptical pattern.
background: radial-gradient(circle at center, #667eea 0%, #764ba2 100%);
Parameters:
- Shape: circle or ellipse
- Position: center, top left, 30% 70%, etc.
- Color stops: two or more colors
Use cases: Spotlight effects, glowing elements, bokeh backgrounds.
3. Conic Gradient
Colors rotate around a central point, like a color wheel.
background: conic-gradient(from 0deg, #667eea, #764ba2, #667eea);
Parameters:
- Starting angle: from 0deg, from 45deg, etc.
- Position: at center, at 30% 50%, etc.
- Color stops: two or more colors
Use cases: Pie charts, donut charts, color wheel displays, creative backgrounds.
4. Mesh Gradient
Multiple overlapping radial gradients create organic, flowing color transitions.
background:
radial-gradient(ellipse at 20% 30%, #667eea88 0%, transparent 50%),
radial-gradient(ellipse at 80% 70%, #764ba288 0%, transparent 50%),
radial-gradient(ellipse at 50% 50%, #f0932b88 0%, transparent 50%),
#f8f9fa;
Use cases: Hero section backgrounds, landing page backgrounds, modern SaaS aesthetic.
5. Animated Gradient
A linear gradient with a background-position animation creates a flowing color effect.
.animated-gradient {
background: linear-gradient(270deg, #667eea, #764ba2, #f0932b, #6ab04c);
background-size: 400% 400%;
animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
Use cases: Hero backgrounds, button hover effects, loading states, attention-grabbing banners.
OKLCH Color Interpolation: Why It Matters
Standard CSS gradients interpolate colors in sRGB space. This produces "grey mud" in the middle of some color transitions (e.g., blue to orange passes through a desaturated grey).
OKLCH interpolation maintains perceptual color quality through the transition:
/* Modern CSS with OKLCH interpolation */
background: linear-gradient(in oklch, oklch(60% 0.2 240), oklch(75% 0.18 30));
TooStamply generates both standard CSS and OKLCH-interpolated gradients. Browser support for OKLCH interpolation is now excellent (Chrome 111+, Firefox 113+, Safari 16.2+).
Gradient Export Formats
| Format | Use Case |
|---|---|
| CSS | Standard web development |
| Tailwind v3 config | Tailwind CSS 3.x projects |
| Tailwind v4 @theme | Tailwind CSS 4.x projects |
| SCSS variable | Sass/SCSS projects |
| SVG | Vector graphics, email-safe backgrounds |
| PNG | Static images, fallbacks, social media |
How to Use TooStamply's Gradient Generator
Step 1: Choose gradient type
Select Linear, Radial, Conic, Mesh, or Animated from the type tabs.
Step 2: Pick colors
Click any color stop to open the color picker. Enter HEX, RGB, or HSL values, or use the visual picker.
Step 3: Adjust positions
Drag color stops along the gradient bar to position them. Add more stops by clicking the gradient bar.
Step 4: Set direction (linear) or center (radial)
For linear gradients, drag the angle dial or type an exact degree value.
Step 5: Choose interpolation
Select sRGB (standard) or OKLCH (perceptually accurate) interpolation.
Step 6: Apply easing (optional)
Add a cubic-bezier easing curve to create non-linear color progressions.
Step 7: Copy or export
Click Copy CSS to get the CSS code. Or download as SVG or PNG.
Popular Gradient Combinations (2026)
Blue-Purple (most popular in SaaS)
linear-gradient(135deg, #667eea, #764ba2)
Sunset
linear-gradient(135deg, #f093fb, #f5576c)
Ocean
linear-gradient(135deg, #4facfe, #00f2fe)
Emerald
linear-gradient(135deg, #43e97b, #38f9d7)
Midnight
linear-gradient(135deg, #0f0c29, #302b63, #24243e)
Peach
linear-gradient(135deg, #ffecd2, #fcb69f)
All of these are available in TooStamply's pre-built gradient library. Click any to load it into the editor.
CSS Gradient for Tailwind CSS
Tailwind v3 — utility classes
<div class="bg-gradient-to-r from-blue-500 to-purple-600">
Tailwind v3 — custom gradient in config
// tailwind.config.js
module.exports = {
theme: {
extend: {
backgroundImage: {
'hero-gradient': 'linear-gradient(135deg, #667eea, #764ba2)',
}
}
}
}
Tailwind v4 — @theme syntax
@theme {
--background-image-hero: linear-gradient(135deg, #667eea, #764ba2);
}
TooStamply generates both Tailwind v3 and v4 output automatically.
Related Guides
- Tailwind CSS gradient generator — Tailwind-specific gradient guide
- Animated CSS gradient background — keyframe animation guide
- CSS gradient border and text effects — advanced techniques
- OKLCH gradient guide — perceptual color interpolation