TEXTCOLOR module

t1t2ne.scripts.textcolor.textcolor(text, color, bold=False)[source]

Change the color and formatting of the text for terminal output.

Parameters:
  • text (str) – The text to be colored

  • color (str) – The color to apply. Options are 'red', 'green', 'blue', 'yellow', 'orange', 'magenta', 'default'.

  • bold (bool, optional) – Whether to apply bold formatting. Default is False.

Returns:

The colored text.

Return type:

str