5 min read
2026-01-22
Define colors via CSS variables and toggle them for light and dark themes.
Text with shade 900 on a 50 background is a safe combination. Check intermediate variants in the Contrast Checker.
Create semantic classes: primary, secondary, accent, neutral — instead of directly using blue-500.
Limit yourself to 2-3 main Tailwind palette colors and their shades.
`bg-blue-500/75` — background with 75% opacity. Convenient for overlays and semi-transparent elements.
The `dark:` utility lets you set alternative colors. Make sure all elements remain readable.
See also: Color Wheel, Image Colors