CSS Linear Gradient Generator

Create a two-color linear gradient with an angle in degrees.

Point the gradient toward the edge you want

Use 90, #2563eb, #7c3aed to send blue to purple from left to right. For the opposite direction, use 270 degrees or swap the two colors. In CSS, angle describes the direction toward the ending color.

Paste the generated background declaration into the intended element. Check the narrowest and widest versions if it sits behind text, since the colors beneath each word can change with the layout. Use the contrast checker on representative colors.

Try an example

Enter an angle in degrees, followed by the start and end HEX colors.

135, #2563eb, #7c3aed

Expected output

background: linear-gradient(135deg, #2563eb, #7c3aed);

Common questions

Where does 90 degrees point?
CSS angles start at the top. At 90 degrees, the gradient runs toward the right.
Can I add another color stop?
The generator outputs two colors. Add further stops manually inside linear-gradient().

The tool processes your input in this browser. It does not upload the input itself.