@staticmethod<EOL><INDENT>def ColorfullyWrite(log: str, consoleColor: int = -<NUM_LIT:1>, writeToFile: bool = True, printToStdout: bool = True, logFile: str = None) -> None:<DEDENT>
text = []<EOL>start = <NUM_LIT:0><EOL>while True:<EOL><INDENT>index1 = log.find('<STR_LIT>', start)<EOL>if index1 >= <NUM_LIT:0>:<EOL><INDENT>if index1 > start:<EOL><INDENT>text.append((log[start:index1], consoleColor))<EOL><DEDENT>index2 = log.find('<STR_LIT:>>', index1)<EOL>colorName = log[index1+<NUM_LIT:7>:index2]<EOL>index3 = log.find('<STR_LIT>', index2 + <NUM_LIT:1>)<EOL>text.append((log[index2 + <NUM_LIT:1>:index3], Logger.ColorNames[colorName]))<EOL>start = index3 + <NUM_LIT:8><EOL><DEDENT>else:<EOL><INDENT>if start < len(log):<EOL><INDENT>text.append((log[start:], consoleColor))<EOL><DEDENT>break<EOL><DEDENT><DEDENT>for t, c in text:<EOL><INDENT>Logger.Write(t, c, writeToFile, printToStdout, logFile)<EOL><DEDENT>
log: str.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
ColorfullyWrite('Hello <Color=Green>Green</Color> !!!'), color name must be in Logger.ColorNames.