"\u001b[0m" + text + "\u001b[0m"
This function defensively wraps the content with a leading and trailing reset \u001b[0m
so any previously active styles are cleared, and any styles inside text cannot “leak”
past its end.
On Windows, ANSI/VT sequences require a modern console with virtual terminal sequences enabled (Windows Terminal, recent PowerShell/CMD) or API flags; older consoles may not render styles. See Microsoft’s Virtual Terminal documentation.
Reset all SGR attributes (SGR
0) before and aftertext.