Change only what you must.
Evaluate four counterfactual repair paths side by side: move foreground lightness, move background lightness, split the shift across both (Pareto minimax ΔE OK), or scope the role to large text / 3:1 UI boundaries.
A finite, fixed-hue search with chroma reduction. Not a global optimum, full CSS gamut mapping or a substitute for layout review.