background: linear-gradient(90deg, #2A5C82 0%, #ff6b35 100%);

How to Create a CSS Gradient in 4 Steps

From a blank canvas to copy-paste code in under a minute.

1

Pick Your Gradient Type

Choose Linear for directional color transitions along a straight path, or Radial for gradients that emanate outward from a central point. The controls update to match your choice.

2

Define Your Color Stops

Click any color swatch to open the native color picker. Drag the position slider to place each stop between 0% and 100%. Add up to 10 stops for complex, multi-tone designs using the Add Color Stop button.

3

Control Direction or Shape

For linear gradients, drag the interactive angle dial, use the slider, or type an exact degree value. For radial gradients, choose between a smooth ellipse or a perfectly uniform circle shape.

4

Copy & Use the Code

The CSS output updates in real time at the bottom of the preview. Click Copy CSS to grab the complete background property. Paste it directly into your stylesheet — it is production-ready immediately.

 Designer Tips

  • Place stops closer together to create sharp, vivid color bands instead of soft fades.
  • Enable the grain overlay for a tactile, textured look that's trendy in modern UI design.
  • Use Copy Shareable Link to save your design or share it with a colleague — the full state is encoded in the URL.
  • Try Random Gradient for instant inspiration when starting from scratch.
  • For text legibility, pair dark gradients with white text and test contrast with a WCAG checker.
  • Diagonal angles like 135deg or 45deg add visual movement and energy to hero sections.

What This Generator Gives You

A full-featured visual editor — not just a color picker.

Live Full-Screen Preview

Every change you make renders instantly in the large preview canvas, giving you an accurate impression of the final result before you copy a single line.

Multi-Stop Color Editor

Go beyond two-color fades. Add up to 10 independent color stops, each with its own hue and position, for rich, cinematic gradients.

Interactive Angle Dial

Set your linear gradient's direction using an intuitive rotary dial, a smooth range slider, or by typing an exact degree — three ways to achieve pixel-perfect angles.

Grain Noise Overlay

Toggle an SVG-based fractal noise layer over your gradient for a grained, analog texture. One switch adds organic depth that flat gradients simply can't achieve.

Syntax-Highlighted Output

The generated CSS is displayed with full syntax highlighting, making it easy to read and audit before pasting into your codebase.

Stateful Shareable URLs

Every setting — colors, positions, type, angle, texture — is encoded directly into the URL. Share the link and anyone can open your exact gradient and continue editing.

CSS Gradient Reference

Everything you need to understand and hand-write gradient code with confidence.

linear-gradient()

Creates a gradient along a straight line. The first argument is the angle (e.g. 135deg), followed by two or more color stops with optional positions.

radial-gradient()

Creates a gradient radiating outward from a center point. Supports circle or ellipse shapes and an optional position like at top left.

color stop

A color at a defined point along the gradient axis — e.g. #ff6b35 40%. Stops without positions are distributed evenly. Stops with the same position create a hard edge.

background shorthand

Gradients are set via the background or background-image property. Multiple backgrounds can be layered using comma separation — gradient on top of image, for example.

/* Linear — basic two-stop */ background: linear-gradient(135deg, #0f2744 0%, #7c5cfc 100%); /* Linear — multi-stop */ background: linear-gradient(90deg, #e85d75 0%, #f0c060 50%, #38bdf8 100%); /* Radial — circle */ background: radial-gradient(circle at center, #7c5cfc 0%, #0c0e14 100%); /* With noise texture layered on top */ background: url("data:image/svg+xml,..."), linear-gradient(135deg, #0f2744, #7c5cfc);

Frequently Asked Questions

Common questions about CSS gradients and how this tool works.

Build your gradient here, then click Copy CSS. The generated code is a complete background property — paste it into any CSS rule. For example: .hero { background: linear-gradient(135deg, #0f2744 0%, #7c5cfc 100%); }. It works in all modern browsers with no prefixes required.
linear-gradient() transitions colors along a straight line at a defined angle — top to bottom at 180deg, left to right at 90deg, or diagonally at any value. radial-gradient() radiates outward from a center point in a circular or elliptical shape. Both accept multiple color stops to create multi-color designs.
Color stops define where each color is placed along the gradient axis, expressed as a percentage of the total distance. #ff0000 0% means red at the very start; #0000ff 100% means blue at the very end. Placing two stops at the same position — like #ff0000 50%, #0000ff 50% — creates a sharp, hard edge with no transition in between.
Yes. CSS supports multiple background layers using comma separation. The first value sits on top. For example: background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('photo.jpg'); overlays a dark semi-transparent gradient over an image — perfect for readable text on hero sections.
Enabling the noise option layers a tiny inline SVG using the <feTurbulence> SVG filter at low opacity over your gradient. This creates a grained, film-like texture without any external images. The technique is widely used in contemporary UI design to give flat digital gradients a more organic, tactile feel.
Click Copy Shareable Link. Your complete gradient state — type, angle, every color and its position, and texture preference — is base64-encoded and stored in the URL hash. Anyone who opens that link will see your exact gradient in the editor, ready to copy or continue editing. No account or storage required.
No. Standard linear-gradient() and radial-gradient() are fully supported in all modern browsers (Chrome, Firefox, Safari, Edge) without vendor prefixes since 2013. The CSS output from this tool uses the standard unprefixed syntax and is production-safe.
Copied!