@@ -107,7 +107,7 @@ def get_flat_list(obj_dict):
107107class ANSIControllsBase :
108108 """Base Class for ANSI color and control sequences."""
109109
110- esc = "\033 [" #:
110+ esc = "\033 ["
111111
112112 # @staticmethod
113113 # def create_seq(control, esc=esc):
@@ -143,13 +143,13 @@ class ANSIColors(ANSIControllsBase):
143143 """
144144
145145 # reset = ANSIControllsBase.esc + "0m"
146- reset = create_color ("0" ) #:
147- bold = create_color ("01" ) #:
148- disable = create_color ("02" ) #:
149- underline = create_color ("04" ) #:
150- reverse = create_color ("07" ) #:
151- strikethrough = create_color ("09" ) #:
152- invisible = create_color ("08" ) #:
146+ reset = create_color ("0" )
147+ bold = create_color ("01" )
148+ disable = create_color ("02" )
149+ underline = create_color ("04" )
150+ reverse = create_color ("07" )
151+ strikethrough = create_color ("09" )
152+ invisible = create_color ("08" )
153153
154154 # class fg:
155155 # """Forderground Colors."""
@@ -182,36 +182,49 @@ class ANSIColors(ANSIControllsBase):
182182 # cyan = create_color("46m")
183183 # lightgrey = create_color("47m")
184184
185+ # https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit
186+
185187 class fg :
186188 """Forderground Colors."""
187189
188- black = ANSIControllsBase .esc + "30m" #:
189- red = ANSIControllsBase .esc + "31m" #:
190- green = ANSIControllsBase .esc + "32m" #:
191- orange = ANSIControllsBase .esc + "33m" #:
192- blue = ANSIControllsBase .esc + "34m" #:
193- purple = ANSIControllsBase .esc + "35m" #:
194- cyan = ANSIControllsBase .esc + "36m" #:
195- lightgrey = ANSIControllsBase .esc + "37m" #:
196- darkgrey = ANSIControllsBase .esc + "90m" #:
197- lightred = ANSIControllsBase .esc + "91m" #:
198- lightgreen = ANSIControllsBase .esc + "92m" #:
199- yellow = ANSIControllsBase .esc + "93m" #:
200- lightblue = ANSIControllsBase .esc + "94m" #:
201- pink = ANSIControllsBase .esc + "95m" #:
202- lightcyan = ANSIControllsBase .esc + "96m" #:
190+ black = ANSIControllsBase .esc + "30m"
191+ red = ANSIControllsBase .esc + "31m"
192+ green = ANSIControllsBase .esc + "32m"
193+ orange = ANSIControllsBase .esc + "33m"
194+ blue = ANSIControllsBase .esc + "34m"
195+ purple = ANSIControllsBase .esc + "35m"
196+ cyan = ANSIControllsBase .esc + "36m"
197+ lightgrey = ANSIControllsBase .esc + "37m"
198+
199+ darkgrey = ANSIControllsBase .esc + "90m"
200+ lightred = ANSIControllsBase .esc + "91m"
201+ lightgreen = ANSIControllsBase .esc + "92m"
202+ yellow = ANSIControllsBase .esc + "93m"
203+ lightblue = ANSIControllsBase .esc + "94m"
204+ pink = ANSIControllsBase .esc + "95m"
205+ lightcyan = ANSIControllsBase .esc + "96m"
206+ white = ANSIControllsBase .esc + "97m"
203207
204208 class bg :
205209 """Background Colors."""
206210
207- black = ANSIControllsBase .esc + "40m" #:
208- red = ANSIControllsBase .esc + "41m" #:
209- green = ANSIControllsBase .esc + "42m" #:
210- orange = ANSIControllsBase .esc + "43m" #:
211- blue = ANSIControllsBase .esc + "44m" #:
212- purple = ANSIControllsBase .esc + "45m" #:
213- cyan = ANSIControllsBase .esc + "46m" #:
214- lightgrey = ANSIControllsBase .esc + "47m" #:
211+ black = ANSIControllsBase .esc + "40m"
212+ red = ANSIControllsBase .esc + "41m"
213+ green = ANSIControllsBase .esc + "42m"
214+ orange = ANSIControllsBase .esc + "43m"
215+ blue = ANSIControllsBase .esc + "44m"
216+ purple = ANSIControllsBase .esc + "45m"
217+ cyan = ANSIControllsBase .esc + "46m"
218+ lightgrey = ANSIControllsBase .esc + "47m"
219+
220+ darkgrey = ANSIControllsBase .esc + "100m"
221+ lightred = ANSIControllsBase .esc + "101m"
222+ lightgreen = ANSIControllsBase .esc + "102m"
223+ yellow = ANSIControllsBase .esc + "103m"
224+ lightblue = ANSIControllsBase .esc + "104m"
225+ pink = ANSIControllsBase .esc + "105m"
226+ lightcyan = ANSIControllsBase .esc + "106m"
227+ white = ANSIControllsBase .esc + "107m"
215228
216229
217230class ANSIControl (ANSIControllsBase ):
0 commit comments