Interface ContrastAccessibilityContext


public interface ContrastAccessibilityContext
An interface representing different contrast accessibility contexts for text elements.

Contrast accessibility contexts define thresholds for contrast ratios to determine accessibility levels for text elements in user interfaces.

See Also:
  • Field Details

    • TEXT

      static final ContrastAccessibilityContext TEXT
      Represents the contrast accessibility context for regular text.
    • LARGE_TEXT

      static final ContrastAccessibilityContext LARGE_TEXT
      Represents the contrast accessibility context for large text.
    • INCIDENTAL

      static final ContrastAccessibilityContext INCIDENTAL
      Represents the contrast accessibility context for incidental text.

      Incidental text has a contrast ratio threshold of 0, indicating that contrast accessibility is not required.

  • Method Details

    • getThreshold

      double getThreshold()
      Gets the contrast threshold ratio for the context.
      Returns:
      The contrast threshold ratio as a double value.