{
  "methodology": "Color Picker Repair Methodology",
  "methodologyVersion": "2.0",
  "implementationVersion": "color-picker-repair-v2",
  "effectiveDate": "2026-07-23",
  "generatedBy": "tools/generate-color-picker-methodology-fixtures.mjs",
  "vectorCount": 16,
  "vectors": [
    {
      "id": "already-passes",
      "scenario": "Selected color already passes one light context.",
      "source": {
        "authored": "#000000",
        "repairValue": "#000000",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": true,
        "evaluatedCandidateCount": 1,
        "searchDomain": "Selected serialized sRGB color",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#000000",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#000000",
          "alpha": 1,
          "alphaHex": "#000000FF"
        },
        "passes": true,
        "minimumRawRatio": 21,
        "displayedMinimumRatio": 21,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 16.5,
        "contrastOvershootDisplayed": 16.5,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#000000",
            "rawRatio": 21,
            "displayedRatio": 21,
            "passes": true
          }
        ]
      },
      "selected": {
        "strategy": null,
        "label": null,
        "serializedColor": "#000000",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#000000",
          "alpha": 1,
          "alphaHex": "#000000FF"
        },
        "passes": true,
        "minimumRawRatio": 21,
        "displayedMinimumRatio": 21,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 16.5,
        "contrastOvershootDisplayed": 16.5,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#000000",
            "rawRatio": 21,
            "displayedRatio": 21,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "repair-on-light-background",
      "scenario": "Selected color fails one light context and needs a darker result.",
      "source": {
        "authored": "#777777",
        "repairValue": "#777777",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2158,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#777777",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777777",
          "alpha": 1,
          "alphaHex": "#777777FF"
        },
        "passes": false,
        "minimumRawRatio": 4.478089453577214,
        "displayedMinimumRatio": 4.48,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#777777",
            "rawRatio": 4.478089453577214,
            "displayedRatio": 4.48,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#777676",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777676",
          "alpha": 1,
          "alphaHex": "#777676FF"
        },
        "passes": true,
        "minimumRawRatio": 4.528436450868204,
        "displayedMinimumRatio": 4.53,
        "distance": {
          "oklabEuclideanX100Raw": 0.28284985051363787,
          "oklabEuclideanX100Displayed": 0.28,
          "deltaE76ReferenceDisplayed": 0.52
        },
        "change": {
          "lightnessRaw": 0.25501181352626245,
          "lightnessDisplayed": 0.255,
          "hueCircularRaw": 17.193783919829684,
          "hueCircularDisplayed": 17.19,
          "chromaRaw": 0.0012236426315561032,
          "chromaDisplayed": 0.0012,
          "channels": [
            "lightness -0.26",
            "chroma +0.0012",
            "hue 17.19deg"
          ]
        },
        "contrastOvershootRaw": 0.028436450868204233,
        "contrastOvershootDisplayed": 0.028436,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#777676",
            "rawRatio": 4.528436450868204,
            "displayedRatio": 4.53,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "repair-on-dark-background",
      "scenario": "Selected color fails one dark context and needs a lighter result.",
      "source": {
        "authored": "#777777",
        "repairValue": "#777777",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Dark theme",
          "authored": "#000000",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#000000"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AAA normal text",
        "ratio": 7
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2113,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#777777",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777777",
          "alpha": 1,
          "alphaHex": "#777777FF"
        },
        "passes": false,
        "minimumRawRatio": 4.68949989000882,
        "displayedMinimumRatio": 4.69,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#777777",
            "rawRatio": 4.68949989000882,
            "displayedRatio": 4.69,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#8E9794",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#8E9794",
          "alpha": 1,
          "alphaHex": "#8E9794FF"
        },
        "passes": true,
        "minimumRawRatio": 7.004423742401973,
        "displayedMinimumRatio": 7,
        "distance": {
          "oklabEuclideanX100Raw": 9.953688216512424,
          "oklabEuclideanX100Displayed": 9.95,
          "deltaE76ReferenceDisplayed": 12.23
        },
        "change": {
          "lightnessRaw": 9.889812797261666,
          "lightnessDisplayed": 9.89,
          "hueCircularRaw": 174.0887924653075,
          "hueCircularDisplayed": 174.09,
          "chromaRaw": 0.011258383306041977,
          "chromaDisplayed": 0.0113,
          "channels": [
            "lightness +9.89",
            "chroma +0.0113",
            "hue 174.09deg"
          ]
        },
        "contrastOvershootRaw": 0.004423742401972852,
        "contrastOvershootDisplayed": 0.004424,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#8E9794",
            "rawRatio": 7.004423742401973,
            "displayedRatio": 7,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "already-passes-light-and-dark",
      "scenario": "One serialized color must pass both light and dark contexts.",
      "source": {
        "authored": "#767676",
        "repairValue": "#767676",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        },
        {
          "label": "Dark theme",
          "authored": "#000000",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#000000"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": true,
        "evaluatedCandidateCount": 1,
        "searchDomain": "Selected serialized sRGB color",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#767676",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#767676",
          "alpha": 1,
          "alphaHex": "#767676FF"
        },
        "passes": true,
        "minimumRawRatio": 4.542224959605253,
        "displayedMinimumRatio": 4.54,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0.16550984460245655,
        "contrastOvershootDisplayed": 0.16551,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#767676",
            "rawRatio": 4.542224959605253,
            "displayedRatio": 4.54,
            "passes": true
          },
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#767676",
            "rawRatio": 4.6232848849972035,
            "displayedRatio": 4.62,
            "passes": true
          }
        ]
      },
      "selected": {
        "strategy": null,
        "label": null,
        "serializedColor": "#767676",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#767676",
          "alpha": 1,
          "alphaHex": "#767676FF"
        },
        "passes": true,
        "minimumRawRatio": 4.542224959605253,
        "displayedMinimumRatio": 4.54,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0.16550984460245655,
        "contrastOvershootDisplayed": 0.16551,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#767676",
            "rawRatio": 4.542224959605253,
            "displayedRatio": 4.54,
            "passes": true
          },
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#767676",
            "rawRatio": 4.6232848849972035,
            "displayedRatio": 4.62,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "translucent-foreground",
      "scenario": "A translucent selected foreground is repaired without changing alpha.",
      "source": {
        "authored": "rgb(65 105 225 / 75%)",
        "repairValue": "#4169E1",
        "alpha": 0.75
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2463,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#4169E1",
        "serializedAlpha": 0.75,
        "serializedPair": {
          "hex": "#4169E1",
          "alpha": 0.75,
          "alphaHex": "#4169E1BF"
        },
        "passes": false,
        "minimumRawRatio": 3.0847129089799044,
        "displayedMinimumRatio": 3.08,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#718FE9",
            "rawRatio": 3.0847129089799044,
            "displayedRatio": 3.08,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#0242D6",
        "serializedAlpha": 0.75,
        "serializedPair": {
          "hex": "#0242D6",
          "alpha": 0.75,
          "alphaHex": "#0242D6BF"
        },
        "passes": true,
        "minimumRawRatio": 4.503366530374808,
        "displayedMinimumRatio": 4.5,
        "distance": {
          "oklabEuclideanX100Raw": 10.882067502151124,
          "oklabEuclideanX100Displayed": 10.88,
          "deltaE76ReferenceDisplayed": 24.45
        },
        "change": {
          "lightnessRaw": 9.913357302316877,
          "lightnessDisplayed": 9.913,
          "hueCircularRaw": 3.2727376240227954,
          "hueCircularDisplayed": 3.27,
          "chromaRaw": 0.04327048148835927,
          "chromaDisplayed": 0.0433,
          "channels": [
            "lightness -9.91",
            "chroma +0.0433",
            "hue 3.27deg"
          ]
        },
        "contrastOvershootRaw": 0.00336653037480783,
        "contrastOvershootDisplayed": 0.003367,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#4171E0",
            "rawRatio": 4.503366530374808,
            "displayedRatio": 4.5,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue",
        "chroma"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "translucent-background-resolved",
      "scenario": "A translucent background is first resolved over its stated white canvas.",
      "source": {
        "authored": "#777777",
        "repairValue": "#777777",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Resolved overlay context",
          "authored": "rgb(0 0 0 / 50%)",
          "authoredAlpha": 0.5,
          "canvas": "#FFFFFF",
          "resolved": "#808080"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2090,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#777777",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777777",
          "alpha": 1,
          "alphaHex": "#777777FF"
        },
        "passes": false,
        "minimumRawRatio": 1.1338543825550624,
        "displayedMinimumRatio": 1.13,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Resolved overlay context",
            "background": "#808080",
            "effectiveForeground": "#777777",
            "rawRatio": 1.1338543825550624,
            "displayedRatio": 1.13,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#2B0E1B",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#2B0E1B",
          "alpha": 1,
          "alphaHex": "#2B0E1BFF"
        },
        "passes": true,
        "minimumRawRatio": 4.500923369049379,
        "displayedMinimumRatio": 4.5,
        "distance": {
          "oklabEuclideanX100Raw": 35.772455756013784,
          "oklabEuclideanX100Displayed": 35.77,
          "deltaE76ReferenceDisplayed": 44.97
        },
        "change": {
          "lightnessRaw": 35.40127582025254,
          "lightnessDisplayed": 35.401,
          "hueCircularRaw": 5.815697320546121,
          "hueCircularDisplayed": 5.82,
          "chromaRaw": 0.05139869756556639,
          "chromaDisplayed": 0.0514,
          "channels": [
            "lightness -35.4",
            "chroma +0.0514",
            "hue 5.82deg"
          ]
        },
        "contrastOvershootRaw": 0.0009233690493788416,
        "contrastOvershootDisplayed": 0.000923,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Resolved overlay context",
            "background": "#808080",
            "effectiveForeground": "#2B0E1B",
            "rawRatio": 4.500923369049379,
            "displayedRatio": 4.5,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "srgb-boundary",
      "scenario": "A high-chroma sRGB boundary color is clipped and validated as six-digit sRGB.",
      "source": {
        "authored": "#00FF00",
        "repairValue": "#00FF00",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 1291,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#00FF00",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#00FF00",
          "alpha": 1,
          "alphaHex": "#00FF00FF"
        },
        "passes": false,
        "minimumRawRatio": 1.3721902770517513,
        "displayedMinimumRatio": 1.37,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#00FF00",
            "rawRatio": 1.3721902770517513,
            "displayedRatio": 1.37,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#148A00",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#148A00",
          "alpha": 1,
          "alphaHex": "#148A00FF"
        },
        "passes": true,
        "minimumRawRatio": 4.501476444315674,
        "displayedMinimumRatio": 4.5,
        "distance": {
          "oklabEuclideanX100Raw": 33.45173301521638,
          "oklabEuclideanX100Displayed": 33.45,
          "deltaE76ReferenceDisplayed": 56.93
        },
        "change": {
          "lightnessRaw": 31.559867242340765,
          "lightnessDisplayed": 31.56,
          "hueCircularRaw": 0.8146765583189222,
          "hueCircularDisplayed": 0.81,
          "chromaRaw": 0.11085285866949435,
          "chromaDisplayed": 0.1109,
          "channels": [
            "lightness -31.56",
            "chroma -0.1109",
            "hue 0.81deg"
          ]
        },
        "contrastOvershootRaw": 0.0014764443156742857,
        "contrastOvershootDisplayed": 0.001476,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#148A00",
            "rawRatio": 4.501476444315674,
            "displayedRatio": 4.5,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "display-p3-source-fallback",
      "scenario": "An authored Display P3 source is resolved to the Color Picker sRGB repair value.",
      "source": {
        "authored": "color(display-p3 1 0.2 0.1)",
        "repairValue": "#FF0000",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Authored Display P3 is preserved as source metadata; Repair V2 searches its resolved serialized sRGB fallback."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 1629,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#FF0000",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#FF0000",
          "alpha": 1,
          "alphaHex": "#FF0000FF"
        },
        "passes": false,
        "minimumRawRatio": 3.9984767707539985,
        "displayedMinimumRatio": 4,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#FF0000",
            "rawRatio": 3.9984767707539985,
            "displayedRatio": 4,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#EE0607",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#EE0607",
          "alpha": 1,
          "alphaHex": "#EE0607FF"
        },
        "passes": true,
        "minimumRawRatio": 4.502045356064774,
        "displayedMinimumRatio": 4.5,
        "distance": {
          "oklabEuclideanX100Raw": 3.388084258846443,
          "oklabEuclideanX100Displayed": 3.39,
          "deltaE76ReferenceDisplayed": 7.87
        },
        "change": {
          "lightnessRaw": 3.0602760681788244,
          "lightnessDisplayed": 3.06,
          "hueCircularRaw": 0.2374706581368855,
          "hueCircularDisplayed": 0.24,
          "chromaRaw": 0.014501934051328047,
          "chromaDisplayed": 0.0145,
          "channels": [
            "lightness -3.06",
            "chroma -0.0145",
            "hue 0.24deg"
          ]
        },
        "contrastOvershootRaw": 0.002045356064773962,
        "contrastOvershootDisplayed": 0.002045,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#EE0607",
            "rawRatio": 4.502045356064774,
            "displayedRatio": 4.5,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue",
        "chroma"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "achromatic-preserve-hue",
      "scenario": "An achromatic source uses the neutral hue marker and minimizes circular hue movement.",
      "source": {
        "authored": "#777777",
        "repairValue": "#777777",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "hue",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2158,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#777777",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777777",
          "alpha": 1,
          "alphaHex": "#777777FF"
        },
        "passes": false,
        "minimumRawRatio": 4.478089453577214,
        "displayedMinimumRatio": 4.48,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#777777",
            "rawRatio": 4.478089453577214,
            "displayedRatio": 4.48,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "hue",
        "label": "Preserve hue",
        "serializedColor": "#767676",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#767676",
          "alpha": 1,
          "alphaHex": "#767676FF"
        },
        "passes": true,
        "minimumRawRatio": 4.542224959605253,
        "displayedMinimumRatio": 4.54,
        "distance": {
          "oklabEuclideanX100Raw": 0.342607258437333,
          "oklabEuclideanX100Displayed": 0.34,
          "deltaE76ReferenceDisplayed": 0.4
        },
        "change": {
          "lightnessRaw": 0.342607258437333,
          "lightnessDisplayed": 0.343,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 5.551115123125783e-17,
          "chromaDisplayed": 0,
          "channels": [
            "lightness -0.34"
          ]
        },
        "contrastOvershootRaw": 0.042224959605253076,
        "contrastOvershootDisplayed": 0.042225,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#767676",
            "rawRatio": 4.542224959605253,
            "displayedRatio": 4.54,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "hue-wrap-preserve-hue",
      "scenario": "Circular hue distance is applied across the zero/360-degree boundary.",
      "source": {
        "authored": "#E080A0",
        "repairValue": "#E080A0",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "hue",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2461,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#E080A0",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#E080A0",
          "alpha": 1,
          "alphaHex": "#E080A0FF"
        },
        "passes": false,
        "minimumRawRatio": 2.704533443412254,
        "displayedMinimumRatio": 2.7,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#E080A0",
            "rawRatio": 2.704533443412254,
            "displayedRatio": 2.7,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "hue",
        "label": "Preserve hue",
        "serializedColor": "#8B6F77",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#8B6F77",
          "alpha": 1,
          "alphaHex": "#8B6F77FF"
        },
        "passes": true,
        "minimumRawRatio": 4.527861385786911,
        "displayedMinimumRatio": 4.53,
        "distance": {
          "oklabEuclideanX100Raw": 16.55569632122438,
          "oklabEuclideanX100Displayed": 16.56,
          "deltaE76ReferenceDisplayed": 32.09
        },
        "change": {
          "lightnessRaw": 14.13372119037113,
          "lightnessDisplayed": 14.134,
          "hueCircularRaw": 0.005635461432518696,
          "hueCircularDisplayed": 0.01,
          "chromaRaw": 0.08621427118020165,
          "chromaDisplayed": 0.0862,
          "channels": [
            "lightness -14.13",
            "chroma -0.0862"
          ]
        },
        "contrastOvershootRaw": 0.02786138578691144,
        "contrastOvershootDisplayed": 0.027861,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#8B6F77",
            "rawRatio": 4.527861385786911,
            "displayedRatio": 4.53,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue",
        "chroma"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "preserve-hue-impossible-alpha",
      "scenario": "No selected RGB channels can repair a fully transparent foreground while alpha is preserved.",
      "source": {
        "authored": "rgb(65 105 225 / 0%)",
        "repairValue": "#4169E1",
        "alpha": 0
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "hue",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": false,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 297,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, serialized sRGB validation, then local failure stabilization",
        "explanation": "No selected-color-only repair in the V2 search domain reaches 4.5:1 in every tested context while preserving alpha 0. The locally stabilized strongest serialized candidate is #4169E1 at a weakest-context ratio of 1:1 and remains a failure."
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#4169E1",
        "serializedAlpha": 0,
        "serializedPair": {
          "hex": "#4169E1",
          "alpha": 0,
          "alphaHex": "#4169E100"
        },
        "passes": false,
        "minimumRawRatio": 1,
        "displayedMinimumRatio": 1,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#FFFFFF",
            "rawRatio": 1,
            "displayedRatio": 1,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": null,
        "label": null,
        "serializedColor": "#4169E1",
        "serializedAlpha": 0,
        "serializedPair": {
          "hex": "#4169E1",
          "alpha": 0,
          "alphaHex": "#4169E100"
        },
        "passes": false,
        "minimumRawRatio": 1,
        "displayedMinimumRatio": 1,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#FFFFFF",
            "rawRatio": 1,
            "displayedRatio": 1,
            "passes": false
          }
        ]
      },
      "returnedStrategies": [],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": "No selected-color-only repair in the V2 search domain reaches 4.5:1 in every tested context while preserving alpha 0. The locally stabilized strongest serialized candidate is #4169E1 at a weakest-context ratio of 1:1 and remains a failure."
    },
    {
      "id": "preserve-chroma-after-serialization",
      "scenario": "The preserve-chroma objective minimizes rather than guarantees exact chroma after sRGB serialization.",
      "source": {
        "authored": "#D97706",
        "repairValue": "#D97706",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "chroma",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2228,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#D97706",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#D97706",
          "alpha": 1,
          "alphaHex": "#D97706FF"
        },
        "passes": false,
        "minimumRawRatio": 3.1858232404059073,
        "displayedMinimumRatio": 3.19,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#D97706",
            "rawRatio": 3.1858232404059073,
            "displayedRatio": 3.19,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "chroma",
        "label": "Preserve chroma",
        "serializedColor": "#C25700",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#C25700",
          "alpha": 1,
          "alphaHex": "#C25700FF"
        },
        "passes": true,
        "minimumRawRatio": 4.5092005825613795,
        "displayedMinimumRatio": 4.51,
        "distance": {
          "oklabEuclideanX100Raw": 8.777449763607517,
          "oklabEuclideanX100Displayed": 8.78,
          "deltaE76ReferenceDisplayed": 13.48
        },
        "change": {
          "lightnessRaw": 8.3521300889696,
          "lightnessDisplayed": 8.352,
          "hueCircularRaw": 9.83604461528023,
          "hueCircularDisplayed": 9.84,
          "chromaRaw": 5.34513194289099e-7,
          "chromaDisplayed": 0,
          "channels": [
            "lightness -8.35",
            "hue 9.84deg"
          ]
        },
        "contrastOvershootRaw": 0.009200582561379456,
        "contrastOvershootDisplayed": 0.009201,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#C25700",
            "rawRatio": 4.5092005825613795,
            "displayedRatio": 4.51,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue",
        "chroma"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "impossible-multi-context",
      "scenario": "No opaque sRGB color can reach 7:1 against both black and white.",
      "source": {
        "authored": "#777777",
        "repairValue": "#777777",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        },
        {
          "label": "Dark theme",
          "authored": "#000000",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#000000"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AAA normal text",
        "ratio": 7
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": false,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 223,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, serialized sRGB validation, then local failure stabilization",
        "explanation": "No selected-color-only repair in the V2 search domain reaches 7:1 in every tested context while preserving alpha 1. The locally stabilized strongest serialized candidate is #EF5EBD at a weakest-context ratio of 3:1 and remains a failure."
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#777777",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777777",
          "alpha": 1,
          "alphaHex": "#777777FF"
        },
        "passes": false,
        "minimumRawRatio": 4.478089453577214,
        "displayedMinimumRatio": 4.48,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#777777",
            "rawRatio": 4.478089453577214,
            "displayedRatio": 4.48,
            "passes": false
          },
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#777777",
            "rawRatio": 4.68949989000882,
            "displayedRatio": 4.69,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": null,
        "label": null,
        "serializedColor": "#EF5EBD",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#EF5EBD",
          "alpha": 1,
          "alphaHex": "#EF5EBDFF"
        },
        "passes": false,
        "minimumRawRatio": 2.9974091479956644,
        "displayedMinimumRatio": 3,
        "distance": {
          "oklabEuclideanX100Raw": 24.089910823450612,
          "oklabEuclideanX100Displayed": 24.09,
          "deltaE76ReferenceDisplayed": 68.14
        },
        "change": {
          "lightnessRaw": 12.725275853877328,
          "lightnessDisplayed": 12.725,
          "hueCircularRaw": 16.459368035682132,
          "hueCircularDisplayed": 16.46,
          "chromaRaw": 0.20454612143096884,
          "chromaDisplayed": 0.2045,
          "channels": [
            "lightness +12.73",
            "chroma +0.2045",
            "hue 16.46deg"
          ]
        },
        "contrastOvershootRaw": 0.006050546700464565,
        "contrastOvershootDisplayed": 0.006051,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#EF5EBD",
            "rawRatio": 2.9974091479956644,
            "displayedRatio": 3,
            "passes": false
          },
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#EF5EBD",
            "rawRatio": 7.006050546700465,
            "displayedRatio": 7.01,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": "No selected-color-only repair in the V2 search domain reaches 7:1 in every tested context while preserving alpha 1. The locally stabilized strongest serialized candidate is #EF5EBD at a weakest-context ratio of 3:1 and remains a failure."
    },
    {
      "id": "near-threshold-serialization",
      "scenario": "The exact serialized candidate, not a hidden pre-serialization value, decides the near-threshold result.",
      "source": {
        "authored": "#F080A0",
        "repairValue": "#F080A0",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2499,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#F080A0",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#F080A0",
          "alpha": 1,
          "alphaHex": "#F080A0FF"
        },
        "passes": false,
        "minimumRawRatio": 2.5300184709302993,
        "displayedMinimumRatio": 2.53,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#F080A0",
            "rawRatio": 2.5300184709302993,
            "displayedRatio": 2.53,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#C44D75",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#C44D75",
          "alpha": 1,
          "alphaHex": "#C44D75FF"
        },
        "passes": true,
        "minimumRawRatio": 4.501053663850947,
        "displayedMinimumRatio": 4.5,
        "distance": {
          "oklabEuclideanX100Raw": 14.530751512671964,
          "oklabEuclideanX100Displayed": 14.53,
          "deltaE76ReferenceDisplayed": 17.59
        },
        "change": {
          "lightnessRaw": 14.446595953691988,
          "lightnessDisplayed": 14.447,
          "hueCircularRaw": 0.6938776533735904,
          "hueCircularDisplayed": 0.69,
          "chromaRaw": 0.015512514269537758,
          "chromaDisplayed": 0.0155,
          "channels": [
            "lightness -14.45",
            "chroma +0.0155",
            "hue 0.69deg"
          ]
        },
        "contrastOvershootRaw": 0.001053663850947295,
        "contrastOvershootDisplayed": 0.001054,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#C44D75",
            "rawRatio": 4.501053663850947,
            "displayedRatio": 4.5,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue",
        "chroma"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    },
    {
      "id": "deterministic-ranking",
      "scenario": "Repeated searches preserve the same strategy ordering and lexical HEX final tie-break contract.",
      "source": {
        "authored": "#8B5CF6",
        "repairValue": "#8B5CF6",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 2535,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#8B5CF6",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#8B5CF6",
          "alpha": 1,
          "alphaHex": "#8B5CF6FF"
        },
        "passes": false,
        "minimumRawRatio": 4.234369397337306,
        "displayedMinimumRatio": 4.23,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0,
        "contrastOvershootDisplayed": 0,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#8B5CF6",
            "rawRatio": 4.234369397337306,
            "displayedRatio": 4.23,
            "passes": false
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#8757F1",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#8757F1",
          "alpha": 1,
          "alphaHex": "#8757F1FF"
        },
        "passes": true,
        "minimumRawRatio": 4.502928115992203,
        "displayedMinimumRatio": 4.5,
        "distance": {
          "oklabEuclideanX100Raw": 1.4544326366378457,
          "oklabEuclideanX100Displayed": 1.45,
          "deltaE76ReferenceDisplayed": 1.83
        },
        "change": {
          "lightnessRaw": 1.453856140485854,
          "lightnessDisplayed": 1.454,
          "hueCircularRaw": 0.06523539575249515,
          "hueCircularDisplayed": 0.07,
          "chromaRaw": 0.0003247209292242814,
          "chromaDisplayed": 0.0003,
          "channels": [
            "lightness -1.45",
            "chroma +0.0003",
            "hue 0.07deg"
          ]
        },
        "contrastOvershootRaw": 0.0029281159922032174,
        "contrastOvershootDisplayed": 0.002928,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#8757F1",
            "rawRatio": 4.502928115992203,
            "displayedRatio": 4.5,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue",
        "chroma"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": true,
      "expectedFailure": null
    },
    {
      "id": "mixed-context-interior-refinement",
      "scenario": "Local failure stabilization discovers a serialized interior candidate that passes both light and dark contexts.",
      "source": {
        "authored": "#777777",
        "repairValue": "#777777",
        "alpha": 1
      },
      "usage": "body-text",
      "backgrounds": [
        {
          "label": "Light theme",
          "authored": "#FFFFFF",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#FFFFFF"
        },
        {
          "label": "Dark theme",
          "authored": "#000000",
          "authoredAlpha": 1,
          "canvas": null,
          "resolved": "#000000"
        }
      ],
      "target": {
        "label": "WCAG 2.2 AA normal text",
        "ratio": 4.5
      },
      "policy": {
        "alpha": "Preserve the selected foreground alpha; never optimize alpha.",
        "gamut": "Quantize and clip each evaluated candidate to uppercase six-digit sRGB before validation."
      },
      "objective": "minimal",
      "rawResult": {
        "version": "color-picker-repair-v2",
        "possible": true,
        "alreadyPasses": false,
        "evaluatedCandidateCount": 282,
        "searchDomain": "Both OKLab lightness regions, bounded a/b neighborhood, then local serialized-sRGB refinement",
        "explanation": null
      },
      "before": {
        "strategy": null,
        "label": null,
        "serializedColor": "#777777",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777777",
          "alpha": 1,
          "alphaHex": "#777777FF"
        },
        "passes": false,
        "minimumRawRatio": 4.478089453577214,
        "displayedMinimumRatio": 4.48,
        "distance": {
          "oklabEuclideanX100Raw": 0,
          "oklabEuclideanX100Displayed": 0,
          "deltaE76ReferenceDisplayed": 0
        },
        "change": {
          "lightnessRaw": 0,
          "lightnessDisplayed": 0,
          "hueCircularRaw": 0,
          "hueCircularDisplayed": 0,
          "chromaRaw": 0,
          "chromaDisplayed": 0,
          "channels": [
            "no rounded channel change"
          ]
        },
        "contrastOvershootRaw": 0.18949989000882006,
        "contrastOvershootDisplayed": 0.1895,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#777777",
            "rawRatio": 4.478089453577214,
            "displayedRatio": 4.48,
            "passes": false
          },
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#777777",
            "rawRatio": 4.68949989000882,
            "displayedRatio": 4.69,
            "passes": true
          }
        ]
      },
      "selected": {
        "strategy": "minimal",
        "label": "Minimal perceptual change",
        "serializedColor": "#777676",
        "serializedAlpha": 1,
        "serializedPair": {
          "hex": "#777676",
          "alpha": 1,
          "alphaHex": "#777676FF"
        },
        "passes": true,
        "minimumRawRatio": 4.528436450868204,
        "displayedMinimumRatio": 4.53,
        "distance": {
          "oklabEuclideanX100Raw": 0.28284985051363787,
          "oklabEuclideanX100Displayed": 0.28,
          "deltaE76ReferenceDisplayed": 0.52
        },
        "change": {
          "lightnessRaw": 0.25501181352626245,
          "lightnessDisplayed": 0.255,
          "hueCircularRaw": 17.193783919829684,
          "hueCircularDisplayed": 17.19,
          "chromaRaw": 0.0012236426315561032,
          "chromaDisplayed": 0.0012,
          "channels": [
            "lightness -0.26",
            "chroma +0.0012",
            "hue 17.19deg"
          ]
        },
        "contrastOvershootRaw": 0.16579864593087823,
        "contrastOvershootDisplayed": 0.165799,
        "gamutAndSerialization": "OKLab candidate quantized and clipped to six-digit sRGB before validation",
        "contexts": [
          {
            "label": "Light theme",
            "background": "#FFFFFF",
            "effectiveForeground": "#777676",
            "rawRatio": 4.528436450868204,
            "displayedRatio": 4.53,
            "passes": true
          },
          {
            "label": "Dark theme",
            "background": "#000000",
            "effectiveForeground": "#777676",
            "rawRatio": 4.637362195062674,
            "displayedRatio": 4.64,
            "passes": true
          }
        ]
      },
      "returnedStrategies": [
        "minimal",
        "hue"
      ],
      "comparisonCandidate": null,
      "deterministicRepeat": null,
      "expectedFailure": null
    }
  ]
}
