HTML Old School

HTML colors

HTML colors are defined in several ways.

New browsers: 224 = 16 777 215 (24-bit colors)

Old netscape browsers: 28 = 258 (8-bit safe color palette)

 

HTML Color Definitions

Hexadecimal

  • #0C0
  • #00CC00

 

RGB - red, green, blue

  • rgb(0, 255, 255)
  • rgba(0, 255, 255, 0.3)

 

RGB%

  • rgb(0%, 100%, 100%)
  • rgba(0%, 100%, 100%, 0.3)

 

HSL - hue, saturation, lightness

  • hsl(H, S, L)  0<H<360 , 0%<H,S<100%
  • hsla(0, 255, 255, 0.3)

 

NAME

  • aqua, red, green, blue, yellow, silver ...

 

 

HTML colors example: 0140htmlcolors.html