Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to ConsoleColor #68

Open
MaxWhite3790 opened this issue Dec 25, 2019 · 1 comment
Open

Add support to ConsoleColor #68

MaxWhite3790 opened this issue Dec 25, 2019 · 1 comment

Comments

@MaxWhite3790
Copy link

Hello! I was wondering if you can add support for ConsoleColor to have a list of more default options.

Like, is it just me or is ConsoleColor.Blue different from Color.Blue?

There are so many blue options, and this one I choose one type of blue in one project and use another in another? The patterns of these projects will be lost.

@cristianst85
Copy link

cristianst85 commented Dec 16, 2021

Hello,

In Windows 10 starting with build 16257 (but only for new clean-installs) there is a new default console color scheme.

With the previous color scheme (now named Legacy) the ConsoleColor.Blue was the same as Color.Blue which had the equivalent of RGB(0,0,255).

With the New color scheme the ConsoleColor.Blue is now RGB(59,120,255).

See this article for more details.

Legacy Scheme (on Windows 7 SP1)
Windows 7 SP1

New Scheme (on Windows 10 21H1 19043.1288)
Windows 10 21H1 19043 1288

No color matches anymore, not even the White or the Black!

One workaround is to convert from ConsoleColor to Color and pass the value to Colorful.Console (since it only supports the Color type as input argument). Here's an extension method that can do the conversion from ConsoleColor to Color using the Legacy scheme: https://gist.github.com/cristianst85/06f147f7a93c0f2109a4d02fb53dfbc7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants