Skip to content
OddsockLocal
Local

Result

background-image: linear-gradient(90deg, #226688 0%, #88cc99 100%);
2 stopsRuns in this browser. Nothing is uploaded.

Ready

How to use

  1. Choose linear, radial, or conic.
  2. Set the angle for linear or conic.
  3. Put each stop on its own line: hex color, then a percentage.
  4. Copy background-image onto the element. Add a background-color behind it if any stop is translucent.

What is Gradient maker?

A gradient in a design tool is a stack of stops. The CSS is one line, and the bugs hide in the syntax: a missing percent, a color with no hash, a single stop. This page writes background-image for a linear, radial, or conic gradient. Each stop is a line with a hex color and a percentage. The opening pair is #226688 at 0% and #88cc99 at 100%, linear, at 90 degrees, which comes out as background-image: linear-gradient(90deg, #226688 0%, #88cc99 100%);

Read more

Ninety degrees runs left to right. Zero runs bottom to top, because CSS angles start at the vertical and move clockwise. Radial ignores the angle and uses an ellipse. Conic uses the angle as the start of the sweep, written as from 90deg. You need at least two stops. Stops can share a position if you want a hard stripe. An eight-digit hex is allowed when a stop should be translucent.

This is a rule, not a PNG. The mesh page bakes a two-color pooled blend into an image for tools that cannot read CSS. Use that when the gradient has to be a file. Use this when it has to stay in a stylesheet and accept more than two stops.

Use cases

  • A hero background fades from a deep blue to a green across the width.
  • A chart fill uses a conic gradient as a simple progress ring.
  • A designer adds a third stop in the middle and checks the CSS still parses.
  • A translucent stop lets a photo show through one end of a linear fade.
  • A hard stripe is made by placing two stops at the same percentage.

A left-to-right blue-to-green ramp

Linear, 90 degrees, stops #226688 0% and #88cc99 100%.

background-image: linear-gradient(90deg, #226688 0%, #88cc99 100%);

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

Left to right. CSS zero points upward and angles move clockwise, so 180 points down.