• Photographer • Visual Artist • Creative Coder • Accessibility Specialist • Front End Developer • Online Fabric Store Owner
Slide 5
Colour and contrast. A short recap
Slide 6
Text has a contrast ratio of at least 4.5:1. Except large text, that should be at least 3.0:1
Slide 7
Screenshots of color contrast analyzer, contrast-ratio.com and the color contrast tool inside chrome developer tools
Slide 8
But let’s go back a step. My fabric store
Slide 9
Pippi Longstockings opening a cupboard with piles of cloths coming out.
Slide 10
It’s a mess. Wordpress, woocommerce, a theme, a child theme, lots of extensions and two versions of bootstrap.
Slide 11
Open electric wires covered by a paper umbrella
Slide 12
Clean this up the right. Start with a color palette, easy
Slide 13
Nyan cat
Slide 14
An accessible color palette
Slide 15
A guy surrounded by complicated looking math
Slide 16
One does not simply pick a colour. How many colour spaces are there?
Slide 17
Which colour space does WCAG use?
Slide 18
Dr. Evil saying “How about no!”
Slide 19
HSL sounds good But it’s not
Slide 20
A blue and a yellow panel with the same saturation and luminance.
Hue: 240° Saturation: 100% Luminance: 50%
Hue: 60° Saturation: 100% Luminance: 50%
Slide 21
3 shades of red with the same hue and saturation but different lightness.
Slide 22
A rainbow of colors with the same hue and saturation but different lightness. The contrast ratio’s vary wildly.
Slide 23
So where does it come from? ITU-R Recommendation BT.709
Slide 24
Michael Scott from the Office looking tired and saying: Why don’t you explain this to me like I’m 5?
Slide 25
• It is a television standard • It has the same color coverage as sRGB • It has a component called Luma • It is a way to measure brightness in sRGB that takes the human eye in account
Slide 26
John Travolta in Pulp Fiction, not knowing what to do
Slide 27
It’s not the Luma that matters. It’s what you do with it
Slide 28
It’s a contrast ratio. Black on white is 21:1
Slide 29
• Black is 21 times as dark as white • White is 21 times as bright as black • The range we work with is always 21
Slide 30
A color that is 3.0:1 on white. 21 / 3… 7.0:1 on black
Slide 31
A color that is 4.5:1 on white. 21 / 4.5… 4.67:1 on black
Slide 32
Chris Pratt getting his mind blown
Slide 33
Only 3 shades fit with 3.0:1. 1:3:9
Slide 34
Only 3 shades fit with 4.5:1. 1:4.5:20.25
Slide 35
Only 2 shades fit with 7:1. 1:7
Slide 36
Where does that leave us?
Slide 37
A grid with shades of gray and their wcag contrast ratio’s
Slide 38
A grid with shades of teal and their wcag contrast ratio’s
Slide 39
I made a thing. https://github.com/erikkroes/color-tool