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

  1. Prepare measured font or typeset-layout values and the explicit design policy requested. For text or font bytes, use the supported syntax explained below.
  2. Enter measuredContrastRatio, fontSizeCssPx, fontWeight, callerLargeTextMinimumPx, callerLargeBoldMinimumPx, callerBoldMinimumWeight, callerNormalContrastMinimum, callerLargeContrastMinimum using the field table and calculation rules, then run the tool.
  3. Read classifiedAsCallerLargeText, requiredCallerContrastRatio, signedContrastMargin, meetsCallerContrastPolicy. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. 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 fieldMeaningValue type; see rules belowRequirement
measuredContrastRatioMeasured contrast rationumberRequired
fontSizeCssPxFont size css pxnumberRequired
fontWeightFont weightnumberRequired
callerLargeTextMinimumPxCaller large text minimum pxnumberRequired
callerLargeBoldMinimumPxCaller large bold minimum pxnumberRequired
callerBoldMinimumWeightCaller bold minimum weightnumberRequired
callerNormalContrastMinimumCaller normal contrast minimumnumberRequired
callerLargeContrastMinimumCaller large contrast minimumnumberRequired

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 fieldMeaningValue type
classifiedAsCallerLargeTextClassified as caller large textboolean
requiredCallerContrastRatioRequired caller contrast rationumber
signedContrastMarginSigned contrast marginnumber
meetsCallerContrastPolicyMeets caller contrast policyboolean
json
{
  "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

  1. Contrast Ratio Text-Size Threshold Check — tool.io

  2. Understanding WCAG 2.2 Contrast (Minimum) — World Wide Web Consortium

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies