muesli / termenv

Advanced ANSI style & color support for your terminal applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BackgroundColor should return err instead of default

eslam-allam opened this issue · comments

The current implementation of BackgroundColor/ForegroundColor attempts to get the default color using a status report, or COLORFGBG if exists, or finally a default color if all else fails. I think this is problematic because I don't know whether the color I received was correct or not. This would make it impossible for me to restore the user's terminal to it's original colors. A much better approach in my opinion is to return an error telling me that the true color couldn't be fetched, giving me the chance to refrain from changing it in the first place.

Is this repo no longer accepting issues?