CSS: RGB Color
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 { background-color: #ffd700; }
Three digits Syntax Shortcut
if there are only 3 digits, it means doubling each digit.
p { background-color: #fd0; } /* is equivalent to */ p { background-color: #ffdd00; }
RGB color function
CSS Color
- CSS: color syntax. Index
- CSS: Color Names
- CSS: RGB Color
- CSS: rgb()
- CSS: HSL Color
- CSS: HWB color (hue whiteness blackness)
- CSS: what is Wide Color Gamut, Display P3, sRGB.
- CSS: LAB, LCH color
- CSS: OKLCH color
- CSS: color() function
- CSS: color-mix() function
- CSS: Opacity (Transparency)
- JS: Convert Color Names to RGB, and to HSL