Your PaletteRx palette defines solid colors. But in production, many of those colors are used at reduced opacity: overlays on images, hover state tints, disabled element treatments, background washes, and shadow colors. Opacity adds a powerful dimension to your color system without adding colors.
How Opacity Works
A color at 50% opacity blends with whatever is behind it. #4f46e5 at 50% opacity on a white background produces a light lavender. The same color at 50% on a dark background produces a muted dark blue. The result depends on the background, which is both the power and the challenge of transparency.
When to Use Opacity
Image overlays: Your dark base at 50 to 70% opacity over hero images ensures text readability. Hover tints: Your primary at 8 to 12% opacity over a card creates a subtle hover effect. Disabled states: Any color at 40% opacity communicates "inactive." Shadows: Your dark base at 10 to 20% opacity creates natural-looking shadows. Background sections: Your primary at 5% opacity creates a subtle tinted section break.
The Accessibility Challenge
WCAG contrast calculations assume solid colors. A semi-transparent text color's actual contrast depends on what is behind it, which may vary across the page. For text, always use solid colors to guarantee consistent contrast. Reserve transparency for backgrounds, overlays, and decorative elements.
Managing Opacity in Your System
Define a small set of standard opacity values and stick to them: 5% (subtle tint), 10% (light overlay), 20% (medium overlay), 50% (strong overlay), 80% (near-solid). This prevents the proliferation of random opacity values that create inconsistency.
color-mix(in srgb, var(--color-primary) 10%, transparent) or eight-digit hex (#4f46e51a for 10% opacity). Both approaches keep your source colors consistent.