HTML5 Colors

HTML5 Colors

A color in HTML is written #(<red_component>,<green_componbent>,<blue_component>)
eg, #220022

  1. red component of the color is 22 hexadecimal number
  2. green component is a 0 hexadecimal number
  3. blue component is 22 hexadecimal number

Shortcut for defining color codes:
If the color code is - #ffffff will be compressed to #fff
Explanation
If all the components of primary colors(either red,green or blue) are same you should write it once.


HTML supports 240 color names. eg, red,lightblue,black,yellow,etc.
Gradients represent a transitoion of a color from one shade to another across an HTML element.
Suppose wwe want to define a shade of orange to yellow for a div element of size 40px * 80px,
we will write:
  1. background-image: -webkit-gradient(orange,yellow);
  2. background-image:-webkit-radial-gradient(circle,white,black);

Comments

Popular posts from this blog

XPath for HTML markup

Apache Hadoop | Running MapReduce Jobs

Laravel | PHP | Basics | Part 2