textContrastGuideline top-level constant
A guideline which requires text contrast to meet minimum values.
This guideline traverses the semantics tree looking for nodes with values or labels that corresponds to a Text or Editable text widget. Given the background pixels for the area around this widget, it performs a very naive partitioning of the colors into "light" and "dark" and then chooses the most frequently occurring color in each partition as a representative of the foreground and background colors. The contrast ratio is calculated from these colors according to the WCAG
const AccessibilityGuideline textContrastGuideline = MinimumTextContrastGuideline._()