Check whether text is readable by computing the WCAG 2.1 contrast ratio between a foreground and background colour and judging AA/AAA.