HomeToolsGradient

CSS WORKSPACE

Gradient

Make a change, inspect the result, and take the output into your project.

How to use this tool ↓

Gradient Generator

Configuration
90deg
Color Stops
0%
100%
css
background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
A PRACTICAL GUIDE

Create a background that works with your content

A CSS gradient is an image generated by the browser from two or more color stops. Use one to give a hero section depth, connect two brand colors, or create a subtle surface without downloading a bitmap. The background stretches with its element, so you need to test its composition at several sizes.

How to use this tool

  1. Choose a gradient type and two starting colors. Keep the first experiment simple so changes are easy to understand.
  2. Move the color stops to control how much space each color occupies. Change the angle to fit your actual section, rather than only the preview square.
  3. Copy the background declaration into the selector for your element. Add a solid background color as a fallback and check text against every part of the gradient.

The middle stop holds the stronger blue until 65% of the gradient line. That keeps most of the surface visually consistent and places the lightest area at one edge. Use dark text on a light gradient or light text on a consistently dark one.

Read the reference documentation ↗
Example to try in your project
.hero {
  background-color: #1e3a8a;
  background-image: linear-gradient(120deg, #1e3a8a 0%, #2563eb 65%, #93c5fd 100%);
}

Before you ship

A gradient preview does not measure text contrast. If your heading crosses a light area, adjust the stops, add an overlay, or move the text into a solid surface. Avoid using color alone to communicate a state.

Explore a related tool