![cover-img](https://project-assets.showwcase.com/1420x/35888/1663344766848-Add%2520a%2520heading%2520(1).png?type=webp)
CSS Colors
16 September, 2022
0
0
0
Contributors
CSS Color is a function of CSS in which we can use 100s of colors to make a website beautiful.
Types
There are three methods to change the color of elements.
1. Color By Name
In this method we can directly change the color of element by its name.
![img](https://project-assets.showwcase.com/1065x/35888/1663344725371-image.png?type=webp)
2. Color By rgb
In this method we have to specify color values of red(r),green(g) and blue(b) so that one color is appear by mixture of all this.
In the rgb there is also 'a' value in which a stands for alpha.which controls the transparency.
![img](https://project-assets.showwcase.com/1065x/35888/1663344692714-image2.png?type=webp)
3. Color by hex value
Hex value which define by '#' in front of it. and can found any color picker from internet.
Just like that
![img](https://project-assets.showwcase.com/1065x/35888/1663344673632-image3.jpeg?type=webp)
and Syntax is
![img](https://project-assets.showwcase.com/1065x/35888/1663344497516-image4.png?type=webp)
Note : In the all the above syntax I mention only
.class_name
but this is also same for #id
.