The Math of Color: Understanding RGB vs. HSL in Web Design
Color in digital systems is more than just aesthetics; it's a coordinate system.
RGB (Red, Green, Blue)
RGB is the machine-native model. It tracks the intensity of light on your screen. While precise for GPUs, it's unintuitive for humans to 'darken' or 'lighten' an RGB value in code.
HSL (Hue, Saturation, Lightness)
HSL is a geometric model.
- Hue: The position on the color wheel (0-360).
- Saturation: The 'vibrancy' or intensity (0-100%).
- Lightness: The amount of white/black (0-100%).
Dynamic Theming
Using CSS variables with HSL (e.g., hsl(var(--hue) 50% 50%)) allows you to create entire color palettes by just changing the hue. Our Palette Extractor tool uses HSL logic to find harmonic colors in any image you upload.