Colors in CSS



Basic code for Colors Properties
<!DOCTYPE html>
<html>
<head>
    <title>Colors </title>
<link  rel=" shortcut icon" href=" favicon.png" >
<link  rel=" stylesheet" href=" style.css" >
</head>
<body>
   <p class="para"> Mallu Coder Sugu</p>
</body>
</html>

Color Properties and source code :
Property Code
Color by name
  • n this CSS color property, we will use the color name to set the color of the text.
  • In this, we can use predefined color names like red, green, blue, purple, orange, etc.
.para {
color:red;
}
Color by RGB:
  • Use RGB value to set the color.
  • RGB color value represents RED, GREEN, and BLUE. And rgb value can be from 0 to 255.
  • We can set rgb value by using this: rgb(red, green, blue).
  • We can also set the opacity of the color by using alpha value. The alpha value can be from 0.0 to 1.0.
  • We can set alpha value using this: rgb(red, green, blue, alpha).
.para {
color: rgb(196, 16, 166, 0.5);
}
Color by HEX:
  • In this color property, we will use the HEX value to set the color.
  • HEX defines the hexadecimal value of the color and we can set using #rrggbb or #000000.
  • In rrggbb, rr for Red, gg for green and bb for blue. OR we can also use these values from 0 to 255.
.para {
color: #201219;
}

Introduction to CSS Part-2 PDF Click here to download

Easy Pickup


  • 1. CSS More Samples
  • 2. CSS Malayalam Classes
  • 3. CSS Malayalam Notes

New Post 



View Post


Acer Predator Neo (2023) Core i7 13700HX 13th Gen







ചന്ദ്രനുശേഷം സൂര്യൻ! അഭിമാനമാകാൻ ആദിത്യാ എല്‍1; ദൗത്യത്തെക്കുറിച്ച് അറിയേണ്ടതെല്ലാം...





മൈക്രോസോഫ്റ്റ് എക്സൽ ഉപയോഗിക്കുന്നുണ്ടോ?, ഇനി മാറ്റം ഇങ്ങനെ......



SYAMRAJ R

Founder and Developer of Mallu Coder Sugu.We provide the best Computer or Programming Related Content With Notes PDF, Amazing Designs, Easy to Readable for Learners.






Welcome to our Web Designing Studio! Stay and learn from here... Follow our social media for new updates