Package cl.emilym.contrastaccessibility
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.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ContrastAccessibilityContext
Represents the contrast accessibility context for incidental text.static final ContrastAccessibilityContext
Represents the contrast accessibility context for large text.static final ContrastAccessibilityContext
Represents the contrast accessibility context for regular text. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the contrast threshold ratio for the context.
-
Field Details
-
TEXT
Represents the contrast accessibility context for regular text. -
LARGE_TEXT
Represents the contrast accessibility context for large text. -
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.
-