
CSS Colors
January 24th, 2022

CSS Colors
RGB
RGB (Red, Green, Blue) values are more archaically but universally used across different industries including printing and publishing. In the past it was more widely used in websites than it is today.
RGBA
RGBA (Red, Green, Blue, Alpha) is used for making a colour transparent. The value for A (alpha) is from 0, completely transparent, to 1 completely opaque.
HEX
hex, is a more recent quick easy value used exclusively for websites and applications.
How HEX work
Hex color codes start with a pound sign or hashtag (#) and are followed by six letters and/or numbers. The first two letters/numbers refer to red, the next two refer to green, and the last two refer to blue. The color values are defined in values between 00 and FF (instead of from 0 to 255 in RGB).
Numbers are used when the value is 1-9. Letters are used when the value is higher than 9. For example:
A=10
B=11
C=12
D=13
E=14
F=15
To get a hexadecimal color, follow these three steps:
Multiply the first number by 16.
Multiply the second number by 1.
Add the two totals together.