APCA Lc Contrast Approximation

Opaque normalized encodeds RGBAPCA 0.0.98 G-style constant approximation (experimental Lcnot WCAG ratio), black clamp and polarity retained; not official certified APCA implementation or font-size conformance. Explicit declared color space/reference and caller applicability; not spectral equivalence, pigment mixing, press readiness or accessibility certification.

Description

APCA-style contrast considers text and background polarity as well as luminance.

APCA-style contrast considers text and background polarity as well as luminance.1

This tool is a bounded approximation rather than a WCAG contrast ratio or an accessibility conformance test. Use APCA Lc Contrast Approximation to evaluate the supplied inputs under the model explained below.

When to use APCA Lc Contrast Approximation

Use APCA Lc Contrast Approximation to evaluate the supplied inputs under the model explained below. Establish the units, measurement scope and model assumptions before entering values.

How to use APCA Lc Contrast Approximation and understand its results

  1. Establish the units, measurement scope and model assumptions before entering values.
  2. Enter Text encoded srgb, Background encoded srgb using the field table and validation rules below, then run the tool.
  3. Read Approximate signed apca lc; interpret the units, signs, ordering and unknown-value placeholders described below.
  4. Correct reported input errors and rerun. Apply successful results according to their specific meanings and check the assumptions before using them in a decision.
Input fieldMeaningValue typeRequirement
textEncodedSrgbText encoded srgbarray of numberRequired; constraints below
backgroundEncodedSrgbBackground encoded srgbarray of numberRequired; constraints below

Enter text and background encoded sRGB triples with each component from 0 to 1. Raise channels to 2.4 and weight by 0.2126729,0.7151522,0.072175; below luminance 0.022 add (0.022−Y)^1.414. Differences below 0.0005 return zero. For background brighter than text use (Ybg^0.56−Ytext^0.57)×1.14, returning zero below 0.1 or (value−0.027)×100 otherwise. Reverse polarity uses exponents 0.65 and 0.62, returning zero above −0.1 or (value+0.027)×100 otherwise. Positive results mean dark text on light background; negative results mean the opposite. No alpha blending, font-dependent criterion or conformance verdict is provided.

Lc≈polarity-specific nonlinear luminance difference with black clamp, low-contrast clipping and signed offset

Use the field order, units and branch conditions described above.

Output fieldMeaningValue type
approximateSignedApcaLcApproximate signed apca lcnumber
json
{
  "input": {
    "textEncodedSrgb": [
      0,
      0,
      0
    ],
    "backgroundEncodedSrgb": [
      1,
      1,
      1
    ]
  },
  "output": {
    "approximateSignedApcaLc": 106.04067321268862
  }
}

Limitations and assumptions

This tool reproduces the committed bounded APCA-style approximation. APCA is a separate perceptual-contrast method with its own implementation and guidance; this result does not certify WCAG conformance or select a font-size threshold.2

This tool is a bounded approximation rather than a WCAG contrast ratio or an accessibility conformance test. Apply the exact scope and assumptions explained above.

All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are explained above; extremely large inputs or outputs can also be rejected. Input errors differ from successful false results, empty match lists and unknown-evidence placeholders.

Alternative or Complementary methods

Use Rec.2020 Coverage Note Lookup for a related task: A color gamut specifies a range of representable chromaticities under a declared model.

Use D50 vs D65 White Point Delta E for a related task: Color differences need coordinates expressed under one comparable reference convention.

References

  1. APCA Lc Contrast Approximation — tool.io

  2. APCA project: implementation and scope — APCA authors

Similar or alternative tools

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