CSS Gradient Color Generator
Contents
Gradients are a powerful and visually appealing way to transition between colors in your web designs. In this page, we will explore the different types of CSS gradients, along with examples and code snippets to help you get started.
Generate Gradient Colors
Easily design beautiful linear and radial gradients with our user-friendly color generating tool.
How to Use the CSS Gradient Color Generator
- Choose a Gradient Type: Select from linear, radial, or conic.
- Pick Your Colors: Use the color picker to choose your desired colors.
- Adjust Gradient Settings: Modify the angle, shape, or position depending on the gradient type.
- Copy the CSS Code: Once satisfied, simply copy the generated CSS code and use it in your web project.
Generated code CSS
Generate Custom Gradients with Multiple Color Stops
This tool allows you to effortlessly create and customize gradients with multiple color stops, including linear, radial, and conic gradients.
You can add multiple color stops to create more complex gradients. Color stops can be positioned using percentages or lengths
Create Striking Color Stripes
Design vibrant color stripes using CSS gradients. Simply click on the 'Stripes' tab, choose your colors, and hit the 'Convert' button. You can also adjust the color positions in the 'Color Options' tab for further customization
Generated multiple color gradient CSS code
What is a CSS Gradient?
A CSS gradient is a transition between two or more colors that smoothly blends one into another. Gradients can add depth, dimension, and a professional touch to your web designs. There are three main types of gradients in CSS: Linear Gradients, Radial Gradients, and Conic Gradients.
Types of CSS Gradients
1. Linear Gradient
Linear gradients transition from one color to another in a straight line. You can specify the direction of the gradient.
Syntax:
background: linear-gradient(direction, color-stop1, color-stop2, ...);
Directions:
Here are the main directions for linear gradients:
- to bottom
- to top
- to right
- to left
- to bottom right
- to top left
- to bottom left
- to top right
- Using Angles 45deg
Examples:
2. Radial Gradients
Radial gradients transition colors from a center point outwards in a circular pattern.
Syntax:
background: radial-gradient(shape size at position, color-stop1, color-stop2, ...);
Radial Gradient Position:
- circle
- ellipse
- closest-side
- farthest-side
- closest-corner
- farthest-corner
Examples:
3. Conic Gradients
Conic gradients are like radial gradients but the color transitions around a center point in a circular direction (like the slices of a pie chart).
Syntax:
background: conic-gradient(from angle, color-stop1, color-stop2, ...);
Conic Gradient Directions:
- from angle
- at position
Basic Conic Gradient:
Preview:
Gradients Examples
1. Stripes (SMPTE color bars)
background: linear-gradient(90deg,
#ffffff 14%, #ffff00 14%, #ffff00 29%, #00ffff 29%, #00ffff 43%, #008000 43%,
#008000 57%, #ff00ff 57%, #ff00ff 71%, #ff0000 71%, #ff0000 86%, #0000ff 86%);
2. Rainbow Gradient
3. Spectrum Gradient
background: linear-gradient(90deg,
#f00, #ff2b00, #f50, #ff8000, #fa0, #ffd500, #ff0, #d4ff00, #af0, #80ff00, #5f0, #2bff00,
#0f0, #00ff2b, #0f5, #00ff80, #0fa, #00ffd5, #0ff, #00d4ff, #0af, #007fff, #05f, #002bff,
#00f, #2a00ff, #50f, #7f00ff, #a0f, #d400ff, #f0f, #ff00d4, #f0a, #ff0080, #f05, #ff002b, #f00);
4. Candy Cane Gradient (Repeating Linear)
background: repeating-linear-gradient(-45deg, #ff0000, #ff0000 20px, #ffffff 20px, #ffffff 40px);
5. Sunset
6. Sun
background: radial-gradient(ellipse at 50% 50%, #F7B733 20%, #F7B733 14%, #FC4A1A 26%, #1a4969);