Skip to content
Advertisement

Tag: backcolor

How to adapt to Linux terminal back color in .NET 5/6?

We have a .NET 5 console application that runs on Windows/Linux/Mac. Our console application relies on the classic fore color scheme to highlight info/warning/error in console with fore colors gray/yellow/red. However we cannot gather the terminal back color as explained in Console.BackgroundColor documentation: Unix systems don’t provide any general mechanism to fetch the current console colors. Because of that, BackgroundColor

Advertisement