Colour and Contrast
Transcript
Made automatically from the video's sound, so it may contain mistakes. Click a line to play from there.
Welcome back to the Explainer. With Canopy's grayscale focal tiers and scan paths locked in, we now introduce hue and chroma while preserving exact perceptual lightness contrast. Today we're upgrading your colour physics and quite frankly, shattering everything you thought you knew about digital palettes.
If you've been relying on standard design tools for the last decade, well, prepare for a bit of a shock. So, just to ground us before we dive deep, we've got our perceptually uniform foundation sorted.
The layout is set, the hierarchy is flawless. Now it's time to actually add colour into the mix, without completely breaking that beautiful contrast we just built. Here is the agenda for today.
We're looking at the HSL brightness lie, perceptual uniformity and APCA, a live canopy layout transformation, three distinct visual archetypes, and we'll wrap up with the neutral tinting formula. Let's get straight into it.
Section one, the HSL brightness lie. Why 50% lightness isn't always 50%. Okay, I want you to think about the yellow and the royal blue we have here. Under the hood in HSL, both of these colours share the exact same values for lightness and saturation.
50% lightness, 90% saturation. Exactly the same. Yet the yellow absolutely blinds you, whilst that blue looks incredibly dark. So if the maths is identical, why is your visual experience so radically different?
Well, it all comes down to human biology. Our eyes have cone receptors, and our green and red cones just heavily, heavily dominate the blue ones. And you know, this brilliantly illustrates exactly why HSL fails us in modern design.
It was built for early computers back in the 1970s, purely to save on processing power. It models raw physics and just averages out the values. It completely ignores how human eyes actually perceive light, oblivious to the fact that saturated yellow just naturally feels vastly lighter to a human being than saturated blue.
Section two, perceptual uniformity and APCA. The science of modern contrast. So how do we fix this? Enter OKLCH, created by Bjorn Otterson, along with Materials HCT.
These are perceptually uniform spaces. They're engineered so that changing a colour's hue doesn't accidentally alter its visual brightness. In OKLCH, the lightness, chroma, and hue axes are truly orthogonal.
You can set your lightness to 60%, sweep across the entire colour wheel, and literally every single hue will actually look like 60% lightness. No more of those muddy grey dead zones you get in standard SRGB gradients. Now this brings us to how contrast algorithms actually judge these colours.
WCAG 2.2 uses some pretty outdated maths based on relative luminance. Because of this, it gives us false negatives. It'll tell you white text on an amber button fails, even though it's perfectly readable.
But worse, it gives false positives. It'll pass dark text on a dark teal button that is completely illegible. Andrew Summer's newer APCA algorithm fixes this by using spatial frequency to accurately predict what human beings can actually read.
Section 3. Live canopy layout transformation. Isolating perceptual colour and contrast. Right, let's put this into practice.
We're going to take the exact canopy layout from our previous explainer, keep the layout completely untouched, and just upgrade its raw colour physics. We're banishing those dead AI template greys. We're replacing the harsh, pure hex 000000 black text, which causes awful visual hollation on screens, with a rich tinted ink.
We'll fix those muddy captions and the completely invisible 2.1 to 1 sign-up input borders, inject some luminous OKLCH gradients, and make sure we have Daltonism safe cues, like underlines and icons. And throughout this whole transformation, we're establishing a really strict contrast floor.
We want at least a 4.5 to 1 WCAG ratio, or an APCA LC of 75. This ensures absolute accessibility for our body copy, whilst maintaining a solid 3 to 1 ratio for things like large text, UI borders and form controls. Section 4.
Three distinct visual archetypes, non-generic guardrails for brand personalities. Notice how we can build entirely different aesthetics just by using temperature tinted neutrals instead of sterile blacks and greys. We can create a warm editorial vibe with stone or parchment neutrals around a 65 degree hue paired with a deep terracotta ink.
Or if we want a crisp Swiss or technical utility look, we use cool slate graphite neutrals at a 250 degree hue with cobalt signals. Or even a tactile craft aesthetic by shifting the hue to 45 degrees for linen and espresso tones with botanical accents.
The secret here? Keep your high chroma strictly corralled inside small focal targets and let those tinted neutrals do the heavy lifting. Section 5.
The neutral tinting formula. Quantified reference numbers and tools. Okay, so what's the actual maths behind this? This table brilliantly illustrates our neutral tinting formula.
It shows exactly how we gently increase chroma as lightness decreases. Take a look at the off white canvas at the top. Incredibly light, up to 99.5%, with barely any chroma, at just 0.005%. But as we move down to our rich, readable ink text, the lightness drops to around 20%, and the chroma gently increases up to about 0.01 or 0.02.
This subtle inverse relationship is a total game changer. It gives you deep, vibrant neutrals that never ever look washed out. And honestly, the best part of all of this, it's completely tool agnostic. You don't need a PhD in colour science to start using this today.
You can hop on to OKLCH.com to pick colours and predict contrast, apply these values directly in Figma using their P3 workflows, write them natively in your style sheets using the CSS OKLCH function, or even test them live using Chrome DevTools contrast curves and vision deficiency simulations.
As we wrap up this explainer, I want to leave you with a bit of a challenge to ponder before our next session. How will you take these foundational formulas, these perfect, mathematically sound, perceptually uniform neutrals, and scale them up into a massive, bulletproof, 12 step light and dark token architecture.
Because that is exactly what we'll be tackling next time. So stop trusting HSL, start tinting your neutrals, and start building with perceptual colour. See you in the next one.