colorama
colorama copied to clipboard
Support foreground/background reversing
ESC [ 7 m swap foreground and background
Thanks for this pull request. This looks good.
One thing I noticed is that on my Mac terminal, writing the swap ansi code (ESC 7m) twice doesn't re-reverse the foreground and background but instead keeps them reversed. With your change, on Windows, writing the code twice reverts to the original state.
In addition, can you please add a helper function to print this code, like we have for example colorama.ansi.clear_line
? e.g. add colorama.ansi.inverse
. Thanks.
Hey. FYI, yesterday I created a PR to test releases before we push them to PyPI. When that is merged, I'll be more confident about resuming merges and releases. I'll try to look at this PR soon. Thank you for creating it!
Does this duplicate the functionality offered by #267? I have no idea which is better, I'm just trying to understand.
These code changes can't be merged until they also have corresponding test changes.