Our great sponsors
-
pytermgui
Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
My Python-based TUI library, PyTermGUI now has the ability to gracefully degrade any color to the current terminal emulator's capabilities, completely automatically! AFAIK it is one of the first libraries of its kind to gain this feature, as I couldn't really find any implementations of it to base mine from. (That, or I'm just not that great at Google-ing.)
One last cool addition that came as a fruit of this work is the really fancy https://no-color.org implementation. Instead of just completely omitting colors from the output, we calculate their perceived brightness and assign them an ```xterm-256 greyscale value accordingly. This means that most contrast is retained, and user interfaces are actually readable with the option set.
Importantly, this comes at the cost of practically 0 performance, and PTG remains magnitudes (simple testing shows 70ms per simple markup parse against 2-9ms) faster than the closest "competing" product and its markup language, even with it having to translate colors between colorspaces, which Rich does not do.