CSS Gradient Generator

Create custom linear, radial and conic CSS gradients with three colors. Adjust the angle and position, preview your gradient instantly, and copy the generated CSS code.

Gradient Settings

Gradient Colors

90°

Preview

CSS Code

background: linear-gradient(90deg, #2563EB, #9333EA, #EC4899);

About CSS Gradient Generator

CSS Gradient Generator is a free online tool for creating linear, radial and conic CSS gradients. Choose three colors, adjust gradient angles and positions, preview the result in real time, and copy the generated CSS code for your website or project.

How to use CSS Gradient Generator

  1. Choose a gradient type: Linear, Radial or Conic.
  2. Select three colors using the color pickers or enter their HEX values.
  3. Adjust the angle for Linear or Conic gradients.
  4. Choose a starting position for Radial or Conic gradients.
  5. Review the live preview and copy the generated CSS code.

What is a CSS Gradient?

A CSS gradient is a CSS image that creates a smooth transition between two or more colors. Gradients can be used as backgrounds for websites, buttons, cards, banners, navigation areas and other interface elements.

Linear, Radial and Conic Gradients

Linear Gradient: Transitions colors along a straight line. Its angle controls the direction of the color transition.

Radial Gradient: Spreads colors outward from a defined center position in a circular shape.

Conic Gradient: Transitions colors around a center point, creating a circular color effect. Its starting angle controls where the color transition begins.

CSS Gradient Example

A linear gradient can combine multiple colors in a single CSS background declaration. For example:

background: linear-gradient(90deg, #2563EB, #9333EA, #EC4899);

This example creates a horizontal gradient that transitions through blue, purple and pink.

Understanding Gradient Colors

CSS gradients support multiple color stops. This generator uses three HEX colors, and CSS distributes the colors across the gradient when explicit stop positions are not provided. You can change each color independently to create different combinations.

HEX colors can be entered using either 3-digit or 6-digit notation. The generated CSS uses normalized 6-digit HEX values.

When to use CSS Gradients

CSS gradients are useful for creating colorful website backgrounds, hero sections, call-to-action buttons, cards, banners and decorative interface elements. They allow developers to create color transitions directly with CSS instead of using a separate image for every gradient effect.

Why use an Online CSS Gradient Generator?

Writing gradient syntax manually can make it difficult to experiment with different colors, directions and positions. A visual generator lets you adjust these settings, see the result immediately and copy the corresponding CSS declaration into your stylesheet.

Your privacy matters

We use optional analytics cookies to understand how our tools are used and improve your experience. These controls apply to Google Analytics only, not advertising preferences. Privacy Policy