Chart text wears ink; a colored key beside it carries identity.
From dataviz (references/marks-and-anatomy.md, palette.md).
Drag Label size to 24px and watch the ratios.
.legend-item { color: var(--text-secondary); }
.key.s4 { background: var(--series-4); }
.end-label { fill: var(--text-secondary); }
Switch White and Ink; each fails different slots.
const onFill = (fill) => contrast(fill, WHITE) >= contrast(fill, INK) ? WHITE : INK;
Type a hex or pick a slot.
Series hues are picked to differ from each other, not to pass text contrast. Six of eight light slots fail 4.5:1 as text.