<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harsh Kaushik</title>
    <description>The latest articles on DEV Community by Harsh Kaushik (@haarsh01).</description>
    <link>https://dev.to/haarsh01</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F602924%2F91b81227-5a30-4039-9f18-46497b95eae7.jpg</url>
      <title>DEV Community: Harsh Kaushik</title>
      <link>https://dev.to/haarsh01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haarsh01"/>
    <language>en</language>
    <item>
      <title>6 Different Color Properties in CSS that you must know </title>
      <dc:creator>Harsh Kaushik</dc:creator>
      <pubDate>Wed, 26 May 2021 09:38:39 +0000</pubDate>
      <link>https://dev.to/haarsh01/6-different-color-properties-in-css-that-you-must-know-3d06</link>
      <guid>https://dev.to/haarsh01/6-different-color-properties-in-css-that-you-must-know-3d06</guid>
      <description>&lt;p&gt;The colour property is used to set the text context and foreground colour of an element.&lt;br&gt;
The color property can be specified in &lt;strong&gt;6 different ways&lt;/strong&gt; . Each one of them provides has some difference from the other.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example : Following Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zB5PXhKu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0oqxr5yo1yu9bc8p8r7p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zB5PXhKu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0oqxr5yo1yu9bc8p8r7p.png" alt="h2 style=colororangered;orangeredh2 h2 style=color#ff6347;#ff6347h2 h2 style=colorrgb(255, 99, 71);rgb(255, 99, 71)h2 h2 style=colorhsl(9, 100%, 64%);hsl(9, 100%, 64%)h2 h2 style=colorrgba(255, 99, 71, 0.7)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Following Output
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s4WLXNax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7d9370ptjpklkf5oxevt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s4WLXNax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7d9370ptjpklkf5oxevt.png" alt="Untitled design (3)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. By  using name
&lt;/h2&gt;

&lt;p&gt;The color keywords all represent solid, plain colors, without transparency. Eg. red, blue, light grey, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Using rgb
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RGB stands for Red, Green and Blue&lt;/strong&gt; . It is a color model where combination of red, green and blue form a color. The intensity of each color has value ranging from &lt;strong&gt;0 to 255&lt;/strong&gt;. This provides very large number of colors dataset.&lt;br&gt;
&lt;strong&gt;Eg. the RGB value for red is: rgb(255, 0, 0) and for voilet is: rgb(238,130,238).&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. By hex code
&lt;/h2&gt;

&lt;p&gt;The colors can be represented by 6 digits hexadecimal code. The codes are made using the &lt;strong&gt;3 colors(Red, Green and Blue)&lt;/strong&gt;. First 2 digits are red, next 2 are green and last 2 are blue. So, the syntax for &lt;strong&gt;Hex Code is: #RRGGBB&lt;/strong&gt;.&lt;br&gt;
For each hexadecimal value between 00 - FF is similar to 0 - 255.&lt;br&gt;
&lt;strong&gt;Eg. #000000 is black and #FFFFFF is white.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Using hsl
&lt;/h2&gt;

&lt;p&gt;The color can also be specified using the &lt;strong&gt;HSL (Hue, Saturation and Lightness)&lt;/strong&gt; components.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hue, is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and
240 is blue.&lt;/li&gt;
&lt;li&gt;Saturation, represents the amount of saturation in the color. It is a percentage value, 0% means a shade of grey, and 100% is the full color.&lt;/li&gt;
&lt;li&gt;Lightness, represents the amount of light in the color. It is also a percentage,
0% is black, 50% is neither light or dark, 100% is white.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Using rgba
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RGBA (Red, Green, Blue, Alpha)&lt;/strong&gt; is an extension of RGB, provided with alpha&lt;br&gt;
transparency. This alpha value determines the opacity of the RGB defined color.&lt;br&gt;
The alpha parameter is a number between 0.0 (transparent) and 1.0 (opaque).&lt;br&gt;
&lt;strong&gt;Eg.rgba(255, 0, 0, 0.6) is a red color, with 0.6 opacity will have the color.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Using hsla
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;HSLA (Hue, Saturation, Lightness, Alpha)&lt;/strong&gt; is also an extension of HSL, provided with alpha transparency. The alpha value and property is same as that in RGBA.&lt;br&gt;
&lt;strong&gt;Eg. hsla(0, 100%, 50%, 0.6) is also a red color with 0.6 opacity and have same color.&lt;/strong&gt;&lt;br&gt;
Follow me on Twitter &lt;a href="https://twitter.com/haarsh01"&gt;https://twitter.com/haarsh01&lt;/a&gt; to get more web development related content .&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
