Smooth Gradient Builder

Preview a two-color gradient and copy its CSS with your chosen angle.

How to use

  1. Choose both endpoint colors and the direction. Zero degrees runs from bottom to top; 90 degrees runs from left to right.
  2. Create the result and paste the background declaration inside the CSS rule for your target element.
  3. If text overlaps the gradient, check readability over both its lightest and darkest areas.

When to use this tool

Prepare a two-color linear gradient for a heading strip or card background. Compare the preview with the exact CSS declaration before handing a design to a developer.

Inputs and settings

Inputs are processed locally in your browser and are not stored.

Example input and actual output

background: linear-gradient(90deg, #000000 0%, #ffffff 100%);

The example starts black on the left and ends white on the right. Stops are fixed at 0% and 100%; additional stops and radial gradients are outside this tool’s scope.

Scope and limitations

Stops are fixed at 0% and 100%. In CSS, 0 degrees points up and 90 degrees points right.

Next step and alternatives

Contrast Checker — Check color pairs before placing text on the background.

Frequently asked questions

What changes when I change the angle?

The first value in linear-gradient() changes. At 180 degrees the transition runs from top to bottom. The element’s aspect ratio also affects how diagonal gradients look.

Does this check text contrast?

No. Check the background color under the text with the contrast checker.

Can it create radial gradients or more than two stops?

It creates two-color linear gradients with stops fixed at 0% and 100%. Additional stops and radial gradients are outside its scope.

Related tools

Explore tools & games

All 120 tools · 16 games

All 120 tools · 16 games

Text & writing 26

Calculators & converters 22

Date & time 12

Images & PDF 26

Data & web 28

Random & handy 6

Games 16