Found during the APCA verification pass for #5225 on beta.6.
What's wrong
High-contrast chip in dark mode uses:
- Background:
--eds-background-interactive-{tone}-emphasis-default = shade 9 → oklch(0.82 …) for all tones in dark
- Text/icon:
--eds-text-on-emphasis / --eds-icon-on-emphasis = --eds-neutral-15 → oklch(0.10 …) in dark (near-black)
That pairing gives these APCA Lc values in dark mode:
| Tone |
Lc |
vs Lc 75 |
| danger |
69.4 |
⚠️ |
| warning |
71.7 |
⚠️ |
| info |
74.0 |
⚠️ |
| neutral |
73.5 |
⚠️ |
| accent |
74.5 |
⚠️ |
| success |
75.6 |
✅ |
Light mode passes comfortably (Lc 80+ for all tones, all chips verified in #5225).
Root cause
The soft-clamp in APCA raises the effective luminance of near-black text (oklch(0.10), Y ≈ 0.001) when the background is not pure white. The emphasis background at shade 9 (L 0.82, Y ≈ 0.55) is light but not extreme, and the near-black text cannot overcome the normalisation to hit Lc 75 cleanly for the more chromatic (warning/danger) fills.
Fix needed in Tokens Studio
Chip correctly uses the semantic tokens as designed — this is not a chip.css issue. The fix must come at the token level. Two options:
- Move
emphasis-default to a darker shade in dark mode — e.g. shade 10 (L 0.88) instead of shade 9 (L 0.82) would bring warning closer to Lc 75 and improve danger.
- Adjust
text-on-emphasis in dark — currently neutral-15 (L 0.10, Y ≈ 0.001). A slightly lighter value would help due to the APCA soft-clamp, but design intent may be true-black.
A design measurement pass on the emphasis/on-emphasis pairing per tone in dark mode would clarify which option keeps the intended visual weight.
Related
Found during the APCA verification pass for #5225 on beta.6.
What's wrong
High-contrast chip in dark mode uses:
--eds-background-interactive-{tone}-emphasis-default= shade 9 →oklch(0.82 …)for all tones in dark--eds-text-on-emphasis/--eds-icon-on-emphasis=--eds-neutral-15→oklch(0.10 …)in dark (near-black)That pairing gives these APCA Lc values in dark mode:
Light mode passes comfortably (Lc 80+ for all tones, all chips verified in #5225).
Root cause
The soft-clamp in APCA raises the effective luminance of near-black text (
oklch(0.10), Y ≈ 0.001) when the background is not pure white. The emphasis background at shade 9 (L 0.82, Y ≈ 0.55) is light but not extreme, and the near-black text cannot overcome the normalisation to hit Lc 75 cleanly for the more chromatic (warning/danger) fills.Fix needed in Tokens Studio
Chip correctly uses the semantic tokens as designed — this is not a chip.css issue. The fix must come at the token level. Two options:
emphasis-defaultto a darker shade in dark mode — e.g. shade 10 (L 0.88) instead of shade 9 (L 0.82) would bring warning closer to Lc 75 and improve danger.text-on-emphasisin dark — currently neutral-15 (L 0.10, Y ≈ 0.001). A slightly lighter value would help due to the APCA soft-clamp, but design intent may be true-black.A design measurement pass on the emphasis/on-emphasis pairing per tone in dark mode would clarify which option keeps the intended visual weight.
Related