Designing hover and transition colors for perceptual accuracy
Standard practice: on hover, lighten or darken the base color by a fixed hex or HSL increment. The problem: HSL lightness increments are not perceptually equal — the same numerical step produces very different perceived brightness changes depending on starting hue. Blue-to-light-blue hover looks flat; yellow-to-light-yellow hover looks huge. The solution: design hover states in OKLCH. Start with the base color in OKLCH, step L (lightness) by +8 for light mode hover, -8 for dark mode hover. This produces perceptually consistent hover contrast across all hues — a blue hover and a yellow hover both 'feel' like the same visual step up or down.
