Filters the standard 16-color ANSI palette down to the colors that meet a
minimum WCAG contrast ratio against a background. Default minimum is 4.5,
WCAG AA's threshold for normal-sized text.
background accepts either the plain 'black'/'white' reference
(the two extremes every built-in theme is checked against) or an
arbitrary RGB triple -- needed for theme presets tuned to a real,
non-black/non-white terminal background (e.g. a detected or named
background-color preset), where contrast has to be checked against that
background's actual color, not just its nearest black/white extreme.
Filters the standard 16-color ANSI palette down to the colors that meet a minimum WCAG contrast ratio against a background. Default minimum is 4.5, WCAG AA's threshold for normal-sized text.
backgroundaccepts either the plain'black'/'white'reference (the two extremes every built-in theme is checked against) or an arbitrary RGB triple -- needed for theme presets tuned to a real, non-black/non-white terminal background (e.g. a detected or named background-color preset), where contrast has to be checked against that background's actual color, not just its nearest black/white extreme.