- CSS Gradient Generator
- How to use Online CSS Gradient Generator?
- CSS Gradient Generator
- CSS Gradients Browser compatibility
- What is a CSS Gradient?
- CSS Linear Gradients
- CSS Radial Gradients
- CSS Repeating Gradients
- CSS Conic Gradients
- CSS Text Gradients
- Where can I find more information about CSS gradients?
- Ultimate CSS Gradient Generator
- Enter existing gradient CSS to import
- Import from an image-based gradient
- Browser compatibility
- What’s new
- Previous versions
- About
- Features
- Help
- Credits
CSS Gradient Generator
CSS Gradient Generator is a free online tool for generating CSS gradients. CSS gradient is a commonly used background type which contains two or more colors which have a color distribution that changes gradually. They are widely used as backgrounds in webpages to provide a fancy effect on design and attract users. If you think that solid backgrounds are boring for your user interface and looking for a lite weight solution, CSS backgrounds is one of the best solutions for this purpose. Image backgrounds has page loading costs and they increase the time needed to load a page. Gradients are a perfect solution if you have concerns on page loading time.
You must be careful when choosing the colors as they have to complete each other. If you need inspiration for colors, you can either use presets or shuffle colors with the button to get random gradients. You can pick if you like any of them and get the code easily.
You can generate CSS gradients manually by using up to 3 colors by your own or you may use preset gradients by choosing from the list. There are 2 main gradient type in CSS, one is linear, and one is radial. It identifies the distribution axis of the colors. Here is a basic comparison between linear and radial gradient.
How to use Online CSS Gradient Generator?
You can create your own CSS gradients by following these steps.
- First, set the colors you want to use in your gradient. 2 colors are enabled as default. You can enable 3rd color by checking the «Use 3rd color» checkbox.
- Select the direction of the gradient. You can either choose linear and radial. If you have selected linear, you must send angle of the gradient.
- If you want to use a preset gradient, you can select from the list, and it automatically set colors for you.
- You can copy the CSS code for gradient either manually or by clicking «Copy CSS» button.
CSS Gradient Generator
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.
CSS Gradients Browser compatibility
IE | Edge | Firefox | Chrome | Safari | Opera | iOS Safari | Opera Mini | Android Browser | Chrome Android |
---|---|---|---|---|---|---|---|---|---|
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.
CSS defines three types of gradients:
— Linear Gradients (direction down/up/left/right/diagonally)
— Radial Gradients (defined by their center)
— Conic Gradients (rotated around a center point)
The CSS data type denotes a CSS made of a progressive transition between two or more colors. A CSS gradient is not a CSS 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 four 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, generated with the repeating-linear-gradient() and repeating-radial-gradient() functions, and which are fixed sized linear or radial gradients repeated as much as needed to fill the entire box.
— conic gradients, generated with the conic-gradient() function, and which transition colors progressively around a circle.
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.
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.
Read more about how radial gradients works and how to generate them here.
CSS Repeating Gradients
What is a CSS Repeating Gradient?
In addition to linear-gradient() and radial-gradient(), this specification defines repeating-linear-gradient() and repeating-radial-gradient() values. These notations take the same values and are interpreted the same as their respective non-repeating siblings defined previously.
When rendered, however, the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.
Read more about how repeating gradients works and how to generate them here.
CSS Conic Gradients
What is a CSS Conic Gradient?
A conic gradient starts by specifying the center of a circle, similar to radial gradients, except that conic gradient color-stops are placed around the circumference of the circle, rather than on a line emerging from the center, causing the color to smoothly transition as you spin around the center, rather than as you progress outward from the center.
A conic gradient is specified by indicating a rotation angle, the center of the gradient, and then specifying a list of color-stops. Unlike linear and radial gradients, whose color-stops are placed by specifying a , the color-stops of a conic gradient are specified with an . Rays are then drawn emerging from the center and pointing in all directions, with the color of each ray equal to the color of the gradient-line where they intersect it.
Read more about how conic 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 text 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.
Ultimate CSS Gradient Generator
A powerful Photoshop-like CSS gradient editor from ColorZilla.
Enter existing gradient CSS to import
Import from an image-based gradient
Browser compatibility
Support using old -webkit- syntax
Browser usage: less than 0.1%
Select «Maximize compatibility» to support
IE9 support (?) Maximize compatibility
What’s new
- » Don’t generate older Opera, IE10 Preview, Webkit syntax by default (turn back on using «Maximize compatibility» mode)
- » Browser Compatibility panel showing supported browser versions, usage stats etc.
- » Support for radial and diagonal linear gradients
- » Support for full multi-stop gradients in Internet Explorer 9 (IE9) using SVG
- » Support for Sass SCSS format using Compassmixins (needs latest beta of Compass)
- » Copy to clipboard button for quickly grabbing the generated code
- » Easy resizing of preview panel by dragging its corner
Previous versions
- » Opacity support
- · Create transparent css gradients, or add fade-in, fade-out, semi-transparency and similar effects
- · Add any number of opacity stops to your gradient
- · Supports opacity stops at any position — completely independent of color stops
- · Automatically switch to rgba/hsla color output mode when transparency is used
- · Outputs older Internet Explorer opacity format (yes, this will even work with IE6!)
- · Opacity support when importing from CSS
- · Supports importing gradients with transparency from an image
- » New ‘Adjustments’ panel — tweak your gradient or create new flavors
- · Adjust hue, saturation and lightness
- · Reverse current gradient
- » Added support for 4 new gradient formats:
- · IE 10+
- · Newer Webkit
- · Opera 11.10+
- · W3C
- » Import from an image — convert an existing gradient image to CSS
- · Supports complex multi-stop gradients
- · Upload an image or import from an image URL
- » Import from CSS — enter existing gradient CSS in various formats and import it into the tool
- » Save your gradients as new presets
- · Edit your gradient, enter its name and hit ‘new’
- · Remove any of your preset gradients using its context menu (right click)
- · Your gradient presets will be persisted in the tool across sessions
About
The Ultimate CSS Gradient Editor was created by Alex Sirota (iosart). If you like this tool, check out ColorZilla for more advanced tools such as eyedroppers, color pickers, palette editors and website analyzers.
As you might know, HTML5 introduced many exciting features for Web developers. One of the features is the ability to specify gradients using pure CSS3, without having to create any images and use them as repeating backgrounds for gradient effects.
Important: You’ll need a recent version of Firefox, Chrome, Safari, Opera or IE to use this Gradient Generator. The resulting CSS gradients are cross-browser — they will work in these browsers and will also fall back to a simpler gradient in older versions of Internet Explorer.
Features
- Powerful Photoshop-like interface
- Cross browser CSS output
- Horizontal, vertical, diagonal and radial gradients
- Complex multi-stop gradients
- Opacity support with multiple opacity stops
- Hex, rgb, rgba, hsl, hsla color formats
- Support for full multi-stop gradients with IE9
- Import from image (convert image gradient to CSS)
- Import from existing CSS
- Adjust gradient by hue, saturation, lightness
- More than 135 gradient presets
- Saving custom gradient presets
- Sass output
- Flexible preview panel
- Gradient permalinks for sending and sharing
- More soon!
Help
- » Adjust the gradient stop position by dragging the stop marker
- » Adjust the stop color by double clicking on the stop marker
- » Delete a stop by draggin the stop marker up or down
- » Add a new stop by clicking anywhere in between the existing stop markers
The ‘Preview’ panel allows previewing the current gradient as a vertical or horizontal one, and also allows quickly previewing how the Internet Explorer fallback gradient will look in IE.
Finally, the ‘CSS’ panel always has the CSS for the current gradient for easy copying and pasting into your stylesheet. You can also use this panel to import an existing gradient CSS into the tool.
Credits
The ‘Ultimate Web 2.0 Gradients’ preset gradients were derived from work by deziner folio and SGlider12.
The Color Picker is a minor adaptation of John Dyer’s Color Picker.
The Base-64 encoder function is from webtoolkit.
Tags: CSS Gradient Editor, CSS Gradient Generator, HTML5 Gradient Generator, CSS3 Gradient Generator, CSS Gradient Maker, CSS Gradient Creator, Linear Gradients, Radial Gradients, IE6, IE7, IE8, IE9, IE10, SVG Gradients, ColorZilla