2. Colors #

Created Monday 15 June 2020

There are three ways to define color:

  1. rgb(r,g,b) - where 0 ≤r, g, b ≤ 255.
  2. #pqrstu - 0≤ all values ≤ f
  3. Names - blue, green, fuchsia
  4. hsl(hue, saturation, lightness) - hue ∈ [0, 360), saturation ∈ [0, 100], lightness ∈ [0, 100]
  5. hsla(hue, saturation, lightness, alpha) - for transparency

Notes:

  1. For grayscale - use the same color for all red, green and blue.

  1. There are about 140 names supported by HTML/CSS
  2. **rgba(r,g,b, alpha) **is used 0≤α≤1 to allow transparency with alpha = 1 being the most opaque. It’s got nothing to do with the rgb values.
  3. Shortened hex(only some cases such as #AABBCC becomes #ABC)