Asaan Tools Pro

CSS Gradient Generator

Gradient Generator

Design Beautiful Background Gradients

CSS gradients are a popular way to add depth and visual appeal to website elements without using images. Our Linear Gradient Generator lets you create smooth color transitions between two or more colors along a straight line. The result is lightweight, scalable, and easy to implement.

How to Create a Gradient:

  1. Select your starting color (Color 1) and ending color (Color 2) using the color pickers.
  2. Use the Angle slider to change the direction of the gradient.
  3. The preview box will update in real-time to show your gradient.
  4. Copy the generated CSS code from the result box and use it in your project.

CSS Gradient Generator: Guide, Examples and FAQ

Written by Muhammad Sufyan | Last updated: 5 November 2026

What this tool does

The Gradient Generator creates a CSS linear gradient from two colours and gives you the code to copy into your website.

How to use it, step by step

  1. Pick the first colour.
  2. Pick the second colour.
  3. Choose the direction.
  4. Copy the CSS.

Worked example 1: Quick example

Blue to purple at 90 degrees gives a smooth left to right background.

Practical tips

Roman Urdu mein khulasa

Gradient generator do rang milakar CSS code banata hai jo aap website mein copy kar sakte hain.

Frequently asked questions

What is a CSS gradient?

A smooth change between colours.

Can I use it in my site?

Yes.

Does it work in all browsers?

Linear gradients are widely supported.

Is it free?

Yes.

Related tools

Related guides

Found a mistake or a wrong result? Please report it. See also our Disclaimer and Editorial Policy.

More Practical Help

Written by Muhammad Sufyan | Last updated: 5 November 2026

A real-life example

A blogger wants a banner background from blue to teal. She picks the colours, sets 135 degrees and copies the CSS. She checks that the title text stays readable over both ends.

More tips

More questions

What is the angle?

It sets the direction of the gradient.

Can I add a third colour?

Add it by hand in the CSS.