hyperfine icon indicating copy to clipboard operation
hyperfine copied to clipboard

Use only colors supported by conhost.exe

Open Gordon01 opened this issue 2 years ago • 4 comments

The previous terminal for Windows is conhost.exe (the one with blue background) which renders some colors differently. Green and Red, for example, are quite dim, whereas, on typical unix terminal and modern Windows Terminal, they're indistinguishable from "normal" ones.

This patch changes the overall hyperfine color scheme to a few "safe" colors in the following manner.

Color scheme

Main measurement text:

green -> yellow bold
green bold -> yellow bold

Min:

cyan -> bright green

Max:

purple -> bright red

Other:

blue -> cyan
magenta -> cyan

Before:

conhost.exe

image image

Windows Terminal

image

VS Code

image

After:

conhost.exe

image image

Windows Terminal

image

VS Code

image

This PR addresses https://github.com/sharkdp/hyperfine/issues/507

Gordon01 avatar Jun 23 '23 22:06 Gordon01

Sorry forgot to change min label color. Now it's correct:

image

Gordon01 avatar Jun 24 '23 09:06 Gordon01

Thank you. Maybe it's just me, but I liked the previous colors better. Is there any way we can do a minimal fix without changing everything? Possibly only on Windows, or ideally only on "affected" terminal emulators?

sharkdp avatar Oct 05 '23 07:10 sharkdp

I guess it's pretty hard to reason about what colors "are better". I'm definitely not ready for it...

Possibly only on Windows, or ideally only on "affected" terminal emulators?

It's doable, I can try if you're fine with additional code

Gordon01 avatar Oct 09 '23 12:10 Gordon01

I would favor a solution where we put all of the used colors in one central place. And then we could have two variants of the "theme", one for cases where we assume that we are running in a old-style blue Windows terminal, and the default theme.

sharkdp avatar Jun 23 '24 11:06 sharkdp