Color formats
Know when to use hex, rgb and hsl.
Hex is common in visual design, RGB is useful for manipulation and HSL for hue and light adjustments.
If you need to vary a color in a controlled way, HSL is often the best choice.
- Hex: #1d4ed8
- RGB: rgb(29, 78, 216)
- HSL: hsl(221, 79%, 48%)
- RGBA/HSLA: adds transparency