Uncover the Secrets of Color Property in CSS | CSS Tutorials for Beginners | Parnika Tutorials

Опубликовано: 18 Февраль 2023
на канале: Parnika Tutorials
90
3

In this tutorial, you'll learn how to use the color property to change the color of text and elements in your web page.

If you're new to CSS, then this tutorial is for you! In this lesson, you'll learn how to use the color property to change the color of text and various elements on your web page. By the end of this tutorial, you'll have a better understanding of how to use the color property and be able to apply it to your websites more effectively!

The color property in CSS is used to set the color to text, the background of the webpage, and also to set the color of borders.

Syntax

color: color/initial/inherit;

Property Values:

1. color: It will set the color to the text which the programmer specifies in the CSS file. The color can be set to the text in 4 forms-

2. color-name: By directly specify the name of the color like blue, green, yellow, white, black, etc.

Syntax:

color: name-of-the-color;

3. RGB Value: Here R stands for Red, G stands for Green, and B stands for Blue. The color will be assigned to the text by using the range of these values. These values range from 0 to 255.

Syntax:

color: RGB(value, value, value);

4. Hexa-Decimal Value: It represents the value of the color in hexadecimal format. It should start with the prefix #. These values ranges from #000000 to #FFFFFF.

Syntax:

color: #RRGGBB;

5. HSL values: HSL stands for Hue, Saturation, and Lightness. The range of hue will be from (0 to 360 degree), saturation means the Grey effect it ranges from (0 to 100%), and Lightness means the effect of light which ranges from (0 to 100%).

Syntax:

color: HSL(value, value, value);

Social media Links:
Instagram:   / parnikatutorials  
Website: http://parnikatutorials.in/
Email id: [email protected]
To get the regular updates:
Telegram link: https://t.me/Parnikatutorials
Facebook: https://m.facebook.com/profile.php?id...
Linkedin:   / parnika-tutorials-a8a9831b2  
Pinterest:   / parnikatutorials0892  
Playlists:
Virtual Coffee with Jagadeesh:
   • VIRTUAL COFFEE WITH JAGADEESH  
Digital Logic Design:
   • Digital Logic Design  
Computer Organization and Architecture:
   • ABOUT PARNIKA TUTORIALS  
C Programming:
   • L 1: WHAT IS AN ALGORITHM AND CHARACT...  
Data Structures:
   • L 1: Uncover the Benefits of Linked L...  

Theory of Computation:
   • ABOUT PARNIKA TUTORIALS  

Compiler Design:
   • ABOUT PARNIKA TUTORIALS  
Operating Systems:    • PROCESS STATE DIAGRAM | LONG TERM, SH...  

Databases:    • ABOUT PARNIKA TUTORIALS  

Computer Networks:
   • ABOUT PARNIKA TUTORIALS  
For GATE PYQs and much more explore:
   / parnikatutorials