Objective readability filtering for the standard 16-color ANSI palette.
Terminal color schemes are user-configurable, so there's no single true
RGB value for e.g. "red" across every terminal emulator -- the table below
is the conventional xterm default palette, used here as a representative
reference for building a sane default theme, not a live guarantee for any
specific user's actual terminal colors.
The contrast math is the standard WCAG 2 relative-luminance/contrast-ratio
formula (the same one used to judge foreground/background text contrast
on the web), applied here to terminal foreground colors against a plain
black or white background -- giving a computed, reviewable answer to
"is this color readable on this background" instead of eyeballing it.
Objective readability filtering for the standard 16-color ANSI palette.
Terminal color schemes are user-configurable, so there's no single true RGB value for e.g. "red" across every terminal emulator -- the table below is the conventional xterm default palette, used here as a representative reference for building a sane default theme, not a live guarantee for any specific user's actual terminal colors.
The contrast math is the standard WCAG 2 relative-luminance/contrast-ratio formula (the same one used to judge foreground/background text contrast on the web), applied here to terminal foreground colors against a plain black or white background -- giving a computed, reviewable answer to "is this color readable on this background" instead of eyeballing it.