Make smaller 'reset's
authorScott Gasch <[email protected]>
Sat, 25 Sep 2021 04:17:16 +0000 (21:17 -0700)
committerScott Gasch <[email protected]>
Sat, 25 Sep 2021 04:17:16 +0000 (21:17 -0700)
ansi.py

diff --git a/ansi.py b/ansi.py
index dfbf48a0b0858c50cb2039ec14d169115a86599b..4c09db3df76c1c66561f097e6c48d48caa62156c 100755 (executable)
--- a/ansi.py
+++ b/ansi.py
@@ -1738,6 +1738,9 @@ def fg(name: Optional[str] = "",
        force_216color: bool = False) -> str:
     import string_utils
 
+    if name is not None and name == 'reset':
+        return '\033[39m'
+
     if name is not None and string_utils.is_full_string(name):
         rgb = _find_color_by_name(name)
         return fg(
@@ -1822,6 +1825,9 @@ def bg(name: Optional[str] = "",
        force_216color: bool = False) -> str:
     import string_utils
 
+    if name is not None and name == 'reset':
+        return '\033[49m'
+
     if name is not None and string_utils.is_full_string(name):
         rgb = _find_color_by_name(name)
         return bg(