-
-
Notifications
You must be signed in to change notification settings - Fork 990
Improve contrast in console (dark text on black console) #1336
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
Comments
Hello @bender2k14
Yes, but it would require your contribution. The colors are defined here Please feel free to experiment with them and send a PR. Thanks, |
Hello @adamsitnik, thanks for your response. If you would prefer to reinvent logging (instead taking on dependency for logging), then I recommend copying how Serilog.Sinks.Console does it. Specifically, the coloring that you are currently using is fine but only apply it to the log type (which implies that it is also displayed). The primary text would be white (or off-white if someone wants to optimize it) on a black background, which is a high contract for easy reading. What do you think? |
Do you mean using the same colors as Serilog? I am fine with that. @AndreyAkinshin what do you think? |
@adamsitnik so, do I understand correctly that we are going to replace { LogKind.Help, ConsoleColor.DarkGreen }, with { LogKind.Help, ConsoleColor.White }, ? |
@AndreyAkinshin yes, but we might also want to set bg color to red for error and yellow text color for warning |
I don't care about the exact colors used. I am suggesting that the text to be logged should be white regardless of the log kind so that the contrast with the black background is high. That will make it easier to read. Instead of coloring the text to be logged, I am suggesting that an abbreviation of the log kind could be colored using your existing color scheme.
No. Sorry that I have been unclear. I created PR #1404 that makes the kind of change that I am talking about. It also includes a screenshot of the new behavior. |
I've marked the issue as BenchmarkDotNet/src/BenchmarkDotNet/Loggers/ConsoleLogger.cs Lines 64 to 75 in 3223c94
and find a better one ;) |
It seems that creating a palette based on the 16 terminal colors that look nice in all possible color themes in all possible terminals is an unsolvable task. Each terminal overrides the standard colors; and for the majority of colors, there is a terminal color theme in which the selected color is not so readable. If we want to create a palette that is readable in all the terminals, we should go beyond the standard 16 colors and use at least 256 colors if it's an available option. Here are some of my thoughts about the implementation:
|
When I run

BenchmarkDotNet.Samples.FSharp
, here is what the console looks like.The text is a dark color on a black background. I am having difficulty seeing the text.
Can this contrast be improved?
The text was updated successfully, but these errors were encountered: