CSS: RGB Color Syntax
RGB Hexadecimal Syntax
The RGB color model uses 3 values, for {Red, Green, Blue}, each with a value range from 0 to 255, in 2 Hexadecimal digits.
p { color: #ffc0cb }
ff
is decimal 255c0
is decimal 192cb
is decimal 203
〔see Binary/Hexadecimal Converter〕
RGB Hexadecimal Syntax Shortcut
When using hexadecimal, if digit for each value are repeated, it can be abbreviated to just 3 hexadecimal digits. Like this:
color: #0f7
same as
color: #00ff77
RGB Integer Syntax
RGB color by integer, 0 to 255
p { color: rgb(255, 192, 203) }
RGB Percent Syntax
p { color: rgb(100%, 75%, 79%) }