Contrast Ratio Text-Size Threshold Check
Screen independently measured contrast with caller text-size/weight thresholds and normal/large policy; no duplicate hex-color contrast derivation or accessibility certification.
Description
Contrast requirements depend on text size and weight as well as measured contrast.
Contrast requirements depend on text size and weight as well as measured contrast. This tool uses explicitly supplied normal/large-text criteria.1, 2
Enter ratio 1–21, positive sizes/contrast minima and nonnegative weights. Choose the large or normal minimum, then return classification, required ratio, signed margin and inclusive gate.
When to use Contrast Ratio Text-Size Threshold Check
Use Contrast Ratio Text-Size Threshold Check when you need to evaluate the supplied records under the calculation and evidence rules below. No colors or contrast are computed, WCAG criteria embedded or accessibility certification issued.
Prepare measured font or typeset-layout values and the explicit design policy requested. For text or font bytes, use the supported syntax explained below.
How to use Contrast Ratio Text-Size Threshold Check and understand its results
- Prepare measured font or typeset-layout values and the explicit design policy requested. For text or font bytes, use the supported syntax explained below.
- Enter measuredContrastRatio, fontSizeCssPx, fontWeight, callerLargeTextMinimumPx, callerLargeBoldMinimumPx, callerBoldMinimumWeight, callerNormalContrastMinimum, callerLargeContrastMinimum using the field table and calculation rules, then run the tool.
- Read classifiedAsCallerLargeText, requiredCallerContrastRatio, signedContrastMargin, meetsCallerContrastPolicy. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| measuredContrastRatio | Measured contrast ratio | number | Required |
| fontSizeCssPx | Font size css px | number | Required |
| fontWeight | Font weight | number | Required |
| callerLargeTextMinimumPx | Caller large text minimum px | number | Required |
| callerLargeBoldMinimumPx | Caller large bold minimum px | number | Required |
| callerBoldMinimumWeight | Caller bold minimum weight | number | Required |
| callerNormalContrastMinimum | Caller normal contrast minimum | number | Required |
| callerLargeContrastMinimum | Caller large contrast minimum | number | Required |
Enter ratio 1–21, positive sizes/contrast minima and nonnegative weights. Choose the large or normal minimum, then return classification, required ratio, signed margin and inclusive gate.
large=size≥largeMinimum OR (weight≥boldMinimum AND size≥largeBoldMinimum) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| classifiedAsCallerLargeText | Classified as caller large text | boolean |
| requiredCallerContrastRatio | Required caller contrast ratio | number |
| signedContrastMargin | Signed contrast margin | number |
| meetsCallerContrastPolicy | Meets caller contrast policy | boolean |
{
"input": {
"measuredContrastRatio": 4,
"fontSizeCssPx": 20,
"fontWeight": 400,
"callerLargeTextMinimumPx": 24,
"callerLargeBoldMinimumPx": 18.6666666667,
"callerBoldMinimumWeight": 700,
"callerNormalContrastMinimum": 4.5,
"callerLargeContrastMinimum": 3
},
"output": {
"classifiedAsCallerLargeText": false,
"requiredCallerContrastRatio": 4.5,
"signedContrastMargin": -0.5,
"meetsCallerContrastPolicy": false
}
} Limitations and assumptions
No colors or contrast are computed, WCAG criteria embedded or accessibility certification issued.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use FOUT Layout-Shift Width Delta Check: Font-swap reflow can displace following blocks. A simple displaced-area ratio differs from browser Cumulative Layout Shift. For a complementary task, use Inline Code Monospace x-Height Match: Matching inline code to body x-height requires independent metrics from both fonts. Equal x-height does not imply equal weight or baselines.
Further background: Understanding WCAG 2.2 Contrast (Minimum).
References
-
Contrast Ratio Text-Size Threshold Check — tool.io
-
Understanding WCAG 2.2 Contrast (Minimum) — World Wide Web Consortium
Similar or alternative tools
- FOUT Layout-Shift Width Delta Check
Font-swap reflow can displace following blocks. A simple displaced-area ratio differs from browser Cumulative Layout Shift.
- Inline Code Monospace x-Height Match
Matching inline code to body x-height requires independent metrics from both fonts. Equal x-height does not imply equal weight or baselines.