diff --git a/imports/access.py b/imports/access.py index c516e14..51591da 100644 --- a/imports/access.py +++ b/imports/access.py @@ -88,6 +88,15 @@ def color_text(text: str, textToColor: list=[('', None)], defaultColor: str=None currentColor = None formattedText = '' + format = False + for itemPair in textToColor: + if itemPair[0] != '' or itemPair[1] is not None: + format = True + break + + if not format: + return defaultColor + text + TRESET + for char in text: handled = False for itemPair in textToColor: