CSS gradient generator

Generate a two-color CSS linear gradient with a preview.

Graphics Stateless

Maximum input length per field: 62 Unicode code points. See the operation limits in the instructions.

Quick guide

Try it with your own data when you’re ready.

Try an example

You enter

Start color (HEX)
#f00
Second color (HEX)
#00f
Angle (degrees)
90

You get

linear-gradient(90deg, #FF0000, #0000FF)
How it works & limits

Enter opaque hex colors and a CSS angle from 0 to 360 degrees, using a decimal point. Example: red, blue and 90 gives linear-gradient(90deg, #FF0000, #0000FF).

Copy the result as a CSS background value. The browser controls final gradient rendering.