Is the blessed project interested in including get_fgcolor() and get_bgcolor()?
The functions work exactly like get_location(), but instead of DSR 6 they emit OSC 10 & 11.^1
Pro
Together with a luminance^2 function, get_fgcolor() and get_bgcolor() could be used to tell light mode from dark mode palettes.
Contra
While OSC 10 & 11 are supported by xterm (and compatible terminals), and the documentation talks about "VT100 text foreground color", there is no guarantee things will work with dumber terminals.
Is the blessed project interested in including get_fgcolor() and get_bgcolor()?
The functions work exactly like get_location(), but instead of DSR 6 they emit OSC 10 & 11.^1
Pro
Together with a luminance^2 function, get_fgcolor() and get_bgcolor() could be used to tell light mode from dark mode palettes.
Contra
While OSC 10 & 11 are supported by xterm (and compatible terminals), and the documentation talks about "VT100 text foreground color", there is no guarantee things will work with dumber terminals.
Pull Request
The proposal is implemented in PR #237