⇣ Scroll for more ⇣

About CSS Gradients

The CSS Gradient online generator tool is a nice and simple to use utility to quickly generate linear and radial color gradients. You can create the gradients and export the CSS code with colors in HEX or RGB format.

Keep reading below to learn more about Linear Gradients, Radial Gradients or Text Gradients.

Or, get inspired and discover more gradient backgrounds by color: , , , , , , , or .

CSS Gradients Browser compatibility

IE Edge Firefox Chrome Safari Opera iOS Safari Opera
10+ 12+ 16+ 26+ 6.1+ 12 7.1+ x 4.4+ 46+

What is a CSS Gradient?

CSS3 gradients let you display smooth transitions between two or more specified colors.
Earlier, you had to use images for these effects. However, by using CSS3 gradients you can reduce download time and bandwidth usage. In addition, elements with gradients look better when zoomed, because the gradient is generated by the browser.

CSS3 defines two types of gradients:
- Linear Gradients (direction down/up/left/right/diagonally)
- Radial Gradients (defined by their center)

Definition from W3Schools

The <gradient> CSS data type denotes a CSS <image> made of a progressive transition between two or more colors. A CSS gradient is not a CSS <color> but an image with no intrinsic dimensions; that is, it has no natural or preferred size, nor a preferred ratio. Its concrete size will match the one of the element it applies to.

There are three kinds of color gradients:
- linear gradients, generated by the linear-gradient() function, where the color smoothly fades along an imaginary line.
- radial gradients, generated by the radial-gradient() function. The more away from an origin a point is, the more far from the original color it is.
- repeating gradients, which are fixed sized linear or radial gradients repeated as much as needed to fill the entire box.

Definition from MDN - Mozilla Developer Network

CSS Linear Gradients

What is a CSS Linear Gradient?

A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line. The image is constructed by creating an infinite canvas and painting it with lines perpendicular to the gradient line, with the color of the painted line being the color of the gradient line where the two intersect. This produces a smooth fade from each color to the next, progressing in the specified direction.

Definition from W3C

Read more about how linear gradients works and how to generate them here.

CSS Radial Gradients

What is a CSS Radial Gradient?

In a radial gradient, rather than colors smoothly fading from one side of the gradient box to the other as with linear gradients, they instead emerge from a single point and smoothly spread outward in a circular or elliptical shape.
A radial gradient is specified by indicating the center of the gradient (where the 0% ellipse will be) and the size and shape of the ending shape (the 100% ellipse). Color stops are given as a list, just as for linear-gradient(). Starting from the gradient center and progressing towards (and potentially beyond) the ending shape uniformly-scaled concentric ellipses are drawn and colored according to the specified color stops.

Definition from W3C

Read more about how radial gradients works and how to generate them here.

CSS Text Gradients

What is a CSS Text Gradient?

Using gradient on a text works the same way as the linear gradient, only that in this case you apply the gradient to a text instead of filling a background.
You'll love it. Just try to hover over the website logo on the left and you'll see for yourself.

Read more about how linear gradients works and how to generate them here.

Where can I find more information about CSS gradients?

You can find more informaiton about CSS gradient at W3Schools, Mozilla Developer Network, W3C, QuirksMode. Compatibility Data from Can I Use. More information about compatibility on Desktop and Network.