CSS Gradient: The Ultimate Tool
Tags: css, design
Published: 2021-10-18 16:04:43

## Hello everyone! 🧡

Before we start Let’s stay connected.
[GitHub](https://github.com/Rameshchandrapola)⭐[LinkedIn](https://www.linkedin.com/in/rameshchandrapola/) and also follow me here for more useful blogs.

In this article, we will learn **what gradients are and also types of CSS gradients**.
## Let's get started🤩
![waiting_gif](https://64.media.tumblr.com/tumblr_ljkn5yjPkO1qixleeo1_400.gifv)

### What is a gradient?

Gradients are CSS elements of the image data type that show a transition between two or more colours. Gradients are very much important as they give good UX to the users. The most popular use for gradients would be in a background element. Backgrounds have a massive impact on a website’s design. So I hope this blog will help you to make beautiful coloured gradients.
> The term background-image refers specifically to gradients. Because gradients have a stacking order, you can think of them as layered background images

### Types of Gradients ✨
There are three types of gradient functions in CSS: 
1. **Linear-Gradient** (created with the linear-gradient() function)
1. **Radial-Gradient **(created with the radial-gradient() function) 
1. **Conic-Gradient** (created with the conic-gradient() function).


## Linear Gradient

- A linear gradient creates a band of colours that progress in a straight line.
- A linear gradient is made up of two basic components: direction and color-stops.
- To create a gradient, You must have at least two colors, but you can have as many as you want.

### 1. Direction

```
// Default direction will be from top-bottom if no direction is given 
  background-image: linear-gradient( #fc00ff, #00dbde);
// From left to right
  background-image: linear-gradient( to right, #fc00ff, #00dbde);
``` 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634284836476/UzC8ACNWe.png)


In the same way, we can change their rotation by specifying a direction.

```
// Diagonally, From corner to corner
background-image: linear-gradient( to bottom right, #fc00ff, #00dbde);
// Specific angle
background-image: linear-gradient( 70deg , #fc00ff, #00dbde);
``` 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634284629847/3j1AASOCi.png)
### 2. Color stops 

- Color stops define what colors make up the gradient and optionally, where to put them.
- If you specify the location as a percentage, 0% represents the starting point, while 100% represents the ending point

![colorstops.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--3FwklEqA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ay8wtxkpe5igx0v28v7v.gif)
```
  background-image: linear-gradient(#eb622c ,#fc00ff 70%, #00dbde);
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634285869602/HeMynhvdu.png)

## Radial Gradient
- Radial gradients are similar to linear gradients, except that they radiate out from a central point

```
// Simple Radial-gradient
  background-image: radial-gradient(#1CD8D2,#ff77cd);
// Radial color stops
  background-image: radial-gradient(#1CD8D2 12px,#ED4264 30%,#7474BF 60%);
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634287445057/bYVsRo-Ry.png)
## Conic Gradient
- Creates an image consisting of a gradient with color transitions rotated around a center point.
```
// Simple Conic Gradient
  background: conic-gradient( #EECDA3, #EF629F);
// Positioning the conic center
  background: conic-gradient(at 10% 30%, #fffb00 20%, #e246cd 30%, #27f1f1 40%);
```


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634291740801/i4Zpc6GNk.png)

# Bonus ✨
Here are some websites which provide a huge collection of gradients where you can copy CSS codes.

- [WebGradients](https://webgradients.com/) 
- [uiGradients](https://uigradients.com/#VeryBlue)
- [CSS Gradient](https://cssgradient.io/)
- [Gradient Deck](https://gradient-deck.vercel.app/)
- [Gradient King](https://dev.di7tazxmp7xob.amplifyapp.com/)











#### My work here is done, We have Hundreds of beautiful colors out there. Now it's your work to use your creativity and make beautiful Gradients for your websites.🥳🧡

That's all for today! 😁 You reached the end of the article 😍
If you found this article helpful, please like and share it 🧡. 
![wow.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1633942604495/S0lY7iu8N.gif)
Don’t forget to share this article with your friends or colleagues. I'm Ramesh Chandra pola who loves to build projects and share valuable tips in my Blogs. Feel free to connect with me on any of the platforms below!🧡   
 [GitHub](https://github.com/Rameshchandrapola)⭐[LinkedIn](https://www.linkedin.com/in/rameshchandrapola/)