requiredContrast function
WCAG AA minimum: 3.0 for large text (>= 18 pt, or >= 14 pt bold), 4.5 otherwise.
Implementation
double requiredContrast({required double fontSize, required bool bold}) =>
fontSize >= 18 || (bold && fontSize >= 14) ? 3.0 : 4.5;