HEX (Hexadecimal with Alpha):
Typically a 6-digit (#RRGGBB
) or 3-digit (#RGB
) code. With alpha, it can be an 8-digit (#RRGGBBAA
) or 4-digit (#RGBA
) code. The last pair of digits (AA or A) represents alpha. For example, #FF000080
is semi-transparent red. 'AA' goes from '00' (transparent) to 'FF' (opaque).
RGBA (Red, Green, Blue, Alpha):
Specifies a color using Red, Green, and Blue (0-255 each), plus an Alpha value (0.0-1.0 for transparency). E.g., rgba(255, 0, 0, 0.5)
is semi-transparent red.
HSLA (Hue, Saturation, Lightness, Alpha):
Similar to HSL, but with an added Alpha value (0.0-1.0). E.g., hsla(0, 100%, 50%, 0.5)
is semi-transparent red.
- Hue: 0-360 degrees.
- Saturation: 0-100%.
- Lightness: 0-100%.
- Alpha: 0.0 (transparent) to 1.0 (opaque).