clock  Mon - Sun 8.00 AM - 8.00 PM
play store


CSS color property


CSS color property

In this, we learn about all the css color property using to design a web page.


color names

 Colors can be specified by using color name like- red, green, orange, blue, white, black, yellow and many more.

css color name

RGB color values

An RGB value can specify a color by using this formula - rgb(red, green, blue)

  • The intensity of the color defines in each parameter (red, green and blue with a value between 0 and 255.
  • This means possible colors are 256 x 256 x 256 = 16777216.
  • For example, displayed red due to rgb(255,0,0), because the highest value (255) set to the red, and green and blue both are set to 0.
  • Another example, green is displayed by rgb(0, 255, 0), because green is set to its highest value (255), and the other two (red and blue) are set to 0.
  • All color parameters set to 0, like this: rgb(0, 0, 0) to display black.
  • All color parameters set to 255, like this: rgb(255, 255, 255) to display white.
  • we can set the parameter according to the need of color by changing different values.

For example

rgb color values

HEX color values

We can also specified color using a hexadecimal value in the form - #rrggbb

  • Hexadecimal values rr (red), gg (green) and bb (blue) are between 00 and ff (same as decimal 0-255).
  • For example, #ff0000 hex value is displayed as red, because red is set to its highest value (ff), and the green and blue are set to 00.
  • Another example, green written as a #00ff00, because highest value (ff) set to the green, and the red and blue are set to 00.

hex color values

  • Set all color parameters to 00, like this: #000000 to display black.
  • Set all color parameters to ff, like this: #ffffff to display white.
  • we can set the parameter according to the need of color by changing different values.


For example

hex xolor values

HSL color values

Using hue, saturation, and lightness (HSL) we can specify a color in the form- hsl(hue, saturation, lightness)

  • In the color wheel from 0 to 360 is the degree of hue . red equal to 0, green equal to 120, and blue equal to 240.
  • Saturation is a percentage value, 0% means a shade of grey, and 100% is the full color.
  • Lightness is also a percentage value, 0% means black, and 100% means white.


For example

hsl color values


  • The intensity of a color are set by saturation.
  • 100% is pure color, no shades of grey
  • 50% is 50% grey, but you can still see the color.
  • Completely grey is equal to 0%, you can no longer see the color.


For example



How much light you want to give the color are describe in lightness of color, where no light (black) is equal to 0%, 50% light (neither dark nor light) is equal to 50%, full lightness (white) is equal to 100%.


For example


Note :- Hue change the color if brightness and lightness are maintained ( if brightness and lightness are not too much low or too high)


HSLA Color Values

An HSLA color value is specified in the form - hsla(hue, saturation, lightness, alpha)

  • HSL color values with an Alpha channel which specifies the opacity (transparency) for a color are an extension of HSLA color values.
  • The number between 0.0 (fully transparent) and 1.0 (not transparent at all) is the alpha parameter.


For example

hsla color values

Coursera, Codeacademy, Udacity, W3Schools, Udemy, Alison, TheNewBoston, edX, P.S.Codewars,Freecodecamp, Managing technical debt blog, Scrimba, Codepen, Codepen/challenges, The Odin Project, htmlreference.​io, cssreference.​io, Frontend Mentor, Dev Challenges, MDN, Code Mentor, Coding Dojo, CSS Battle, Codier, Ace Frontend, Can I Use, CSS Tricks, 30 Seconds of Code,tutorialspoint, Neumorphism, Shaddows Brumm, Fancy Border Radius, Glow Generator, Clothoid Corners, Glassmorphism, Clipy, CSS Filters, Base64 Image, Quantity Queries, Animations, Cubic-Bezier, Keyframes, Wait Animate, Transition.Style, graphic design, web design, website design, website builder, web developer, web designer, webdesign, ecommerce website, web design company, website creator, website designer, responsive web design, web development company, best website design, web design software, web page design, build a website, web developer salary, design website, web design courses, how to design a website, web design inspiration, website layout, web designer salary, web application development, ecommerce website design, web agency, software development company, web design tutorial, web programming, design company, website design templates, what is web designing, web developer jobs, website developer, web design agency, freelance web developer, web design services, freelance web designer, graphic design websites, web solutions, ecommerce website development, free website design, web development courses, webdev, web developers, web development tools, website design services, developpeur web, web design london, website design ideas, web designing and programming, design a website, web design and development, web dev, web development services, homepage design, best designed websites, cheap website design, learn web design, web design templates, web design tools, web design jobs, website design inspiration, web design india, flash website, website developers, designer websites, website services, website design cost, good website design, site design, simple website design, cool website designs, modern website design, graphic designer websites, webcode, best web design software, website making, free web design software, mobile website design, learn web development, front end web developer, how to become a web developer, web developer portfolio, web development company in india, python web development, web development tutorial, website company, website design and development, web company, webdesigning, professional website design, affordable web design, best web design company, creative web design, top website designs, website design pricing, web developer tools, how to develop a website