Skip to content

Disable global styles #1673

Answered by nils-a
CypherPotato asked this question in Q&A
Discussion options

You must be logged in to vote

If you only want the colors disabled, spectre.console supports NO_COLOR. Simply setting an env variable NO_COLOR=1 should remove all colors from the output.

If you need a bit more control, you can change the profile of AnsiConsole - you could do that once and all output will be changed.

For example, like this:

// remove all colors from the output
AnsiConsole.Console.Profile.Capabilities.ColorSystem = ColorSystem.NoColors;

// remove all ANSI sequences 
AnsiConsole.Console.Profile.Capabilities.Ansi = false;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CypherPotato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants