- CSS Gradient Generator
- Random Gradient Generator
- Gradients
- FAQ
- Can I use CSS gradients in all browsers?
- What should I do to support as many browsers as possible?
- How do I make my random gradients look good?
- How do you add a gradient to an image in CSS?
- Vivid Gradient Generator Tool
- Color Gradients in LCH, HSB, and HSL
- Exporting a Gradient as an SVG Image
- Gradient CSS (for linear, radial, and conic gradients)
- More on Color
- Get the (Free) UI Color Cheatsheet
- 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
- How to use Online CSS Gradient Generator?
CSS Gradient Generator
This tool will help you generate a linear, radial or conical CSS gradient. It allows gradients to be created using multiple layers to create some interesting patterns. Try out the different color palettes on the random gradient generator or see the examples to get a feel for what is possible.
Random Gradient Generator
Gradients
Basic Danger Starburst Fade Out White Fade In Black Criss Cross Rainbow Hue Picker Rounded Corner Circles Triangles Snowflakes Sunny Day Warm Corners HSV Color Picker Boxed In
FAQ
Can I use CSS gradients in all browsers?
Almost all browsers at least support the linear-gradient and radial-gradient values for image properties such as background and background-image .
The support for conic-gradient is almost as good, with the exception for Internet Explorer. Even if it is important to support Internet Explorer on your site, it may or may not be so important to show conic gradients.
What should I do to support as many browsers as possible?
Just put a fallback value before your preferred value, such as a solid color. You can even stack multiple fallbacks in (reverse) order of preference:
background: #48abe0; background: linear-gradient(90deg, white 0%, #48abe0 100%); background: conic-gradient(from 180deg, white 0%, #48abe0 100%);
How do I make my random gradients look good?
Randomly generated gradients can easily look like something straight out of the 90’s. Try generating a few gradients and use some different color pallets until you find one that looks reasonable. You can then remove any colours or layers that don’t look right.
How do you add a gradient to an image in CSS?
The CSS background and background-image properties allow multiple layers. Simply put a semi-transparent gradient before the background image, separated by a comma. E.g:
background: linear-gradient(white, transparent), url('/path/to/image.png');
Vivid Gradient Generator Tool
When you try to create gradients across a wide range of hues, you often will see a gray dead zone ☠️™ in the middle of your gradient. Why is this worth a ridiculously ominous emoji? Because it means your gradients look like this:
Put simply: to get a gradient that avoids the dreaded gray dead zone ☠️, you don’t draw a straight line from A to B, you draw a biiiig curve.
Or, to be more accurate/geeky: we interpolate the gradient in a hue-based color system, such as LCH, HSB, or HSL (not RGB) 🤓. This avoids the line of gray that goes through the center of every color space. Design apps, online gradient tools, and even CSS all fail in this regard – so I made this tool!
Color Gradients in LCH, HSB, and HSL
Currently, you can create gradients in 3 different color systems in this tool, which yield slightly different results. Here’s the skinny:
- LCH (luminance-chroma-hue): The default choice of this tool, LCH is an amazing color system that not only creates beautiful, rich gradients across a wide range of hues, but does so in a perceptually smooth way. If you were to view the gradient in grayscale, you’d see only a smooth transition from a lighter to a darker gray – preventing the awful “banding” that you’ll see in some hand-picked gradients. (Note: the perceptually uniform nature of LCH also makes it great for data visualization color palettes)
- HSB (hue-saturation-brightness): While not perceptually uniform, sometimes HSB will offer a more interesting (and vivid) take on a gradient between two stops. In particular, if your LCH gradient has an ugly brown-yellow in it, try checking out the HSB version. HSB is a fantastic color system for designers, and I’ve written a comprehensive guide to HSB.
- HSL (hue-saturation-lightness): HSB and HSL will often be very similar, particularly in bright gradients. Nonethless, sometimes it’s worth seeing both. Also, notice the pink “band” in the HSL gradient above – that’s essentially a little spike in brightness caused by artifacts of using a non-perceptual color system. Use LCH to avoid these. (Also: I’m often asked about the difference between HSB and HSL)
Exporting a Gradient as an SVG Image
Need to use one of these gradients in your design app – e.g. Figma, Sketch, or Adobe XD?
Simple – just press “Export SVG” and drag the file directly into your design app.
But what if you’re designing in-browser? First of all, stop. Use a design app, you silly. But presuming you’re set in your ways, just grab the.
Gradient CSS (for linear, radial, and conic gradients)
It’s dead simple to get the gradient CSS for any of the 3 types of gradients.
Simply press «Copy CSS» and add the code to the element you need it.
Note: if you have other background properties set for the element in question, you can change the property from background to background-image 👍
More on Color
For more color tools and articles on using color in UI design, check out:
- Color in UI Design: A Practical Framework. My take on why color theory sucks, and what art school should be teaching instead.
- The Data Visualization Color Picker. Create multi-color, single-hue and divergent color schemes for your data visualizations.
- Design Hacks, my newsletter where I send original design tips and tactics to 50,000+ of my closest friends.
And, as always, send me feedback and feature requests. I aim for this to be the very best gradient tool on the web – so what do you want to see? 😎
Get the (Free) UI Color Cheatsheet
Learn how to use color effectively in UI design, even if you aren’t “artsy” & have no design experience. The same strategies I use for my clients – from Fortune 100 to Y-Combinator startups.
Success! Now check your email to download the cheatsheet.
Exclusive design tutorials. Over 50,000 subscribed. One-click unsubscribe.
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
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.