Specifying colors

Named colors

When using colors in CSS we can use named colors or we can be explicit with rgb(0,100,255).

RGB/RGBA

We can also use rgba, which is like rgb but it includes a fourth argument called alpha channel with a value range of 0-1.

On 0, rgba will be transparent.

Additionally, we can use hexadecimal values with #000000 for black and #FFFFFF for white.

Note that for hex we can shorthand the values by using pairs: #FFFFFF == #FFF.

HSL

Hue, Saturation, Lightness

Decent color combinations:

Not quite black: #333

Can also look at Coolors