jquast / blessed

Blessed is an easy, practical library for making python terminal apps

Home Page:http://pypi.python.org/pypi/blessed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interest in get_fgcolor() and get_bgcolor()?

stefanholek opened this issue · comments

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 luminance2 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

Footnotes

  1. https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands

  2. https://alienryderflex.com/hsp.html

Yes I like it very much thanks for your time, we will definitely merge it for release

closed this was in the 1.20.0 release, thanks again @stefanholek you're the best