Tabellab
IT & Tech Intermediate

Colour Contrast & Accessibility Math: WCAG Contrast Ratios & Relative Luminance

Hex to RGB, sRGB linearisation, relative luminance, contrast ratios, AA/AAA for normal and large text, darkening a failing brand colour, a full palette contrast matrix with highlighting and a contrast report with a chart: 8 graded labs on one fictional design studio.

8 lessons 8 labs 1.9 h Certificate

The first lesson is free โ€” no account needed.

About this course

A colour contrast and accessibility course that does the math behind contrast checkers for one fictional design studio, Fernhill Studio, in a spreadsheet, for web and UI designers, front-end developers, accessibility testers and content teams. You split hex colours into RGB with HEX2DEC and MID and build hex codes back with DEC2HEX, linearise sRGB channels with the piecewise formula, calculate relative luminance with 0.2126 R + 0.7152 G + 0.0722 B and pick black or white text, compute contrast ratios with (L1 + 0.05) / (L2 + 0.05) and label them x.xx:1, decide which elements count as large text and whether each passes level AA and AAA, darken a failing brand colour step by step until it passes, build a 6 ร— 6 contrast matrix with one formula and highlighting, and finish a contrast report with a chart. WCAG is referenced in general terms, with no W3C affiliation. The first lab is free.

Lessons

  1. Hex Colours to RGB and Back: HEX2DEC, MID & DEC2HEXLab12 minFree
  2. sRGB to Linear Light: the Piecewise IF with ^2.4Lab13 min Pro
  3. Relative Luminance: 0.2126 R + 0.7152 G + 0.0722 BLab15 min Pro
  4. Contrast Ratio: (L1 + 0.05) / (L2 + 0.05)Lab13 min Pro
  5. AA & AAA: Pass/Fail for Normal and Large TextLab15 min Pro
  6. Fixing a Palette: Darken Step by Step Until It PassesLab16 min Pro
  7. Contrast Matrix for a Brand Palette: Mixed References & HighlightingLab16 min Pro
  8. Contrast Report: Pass Rate, Shortfalls & a Chart of Ratios vs TargetsLab15 min Pro