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

Feature request: improve colors / highlighting of commands in Windows Terminal #986

Open
Karl-WE opened this issue May 25, 2021 · 11 comments
Labels
Area-Accessibility Issue related to accessibility Area-Output Issue related to CLI output Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@Karl-WE
Copy link
Contributor

Karl-WE commented May 25, 2021

Brief description of your issue

color of winget commands is good to recognize compared to console

Steps to reproduce

open cmd or PowerShell Console
type
winget

open Windows Terminal (Preview)
type
winget

Expected behavior

both consoles show clear yellow highlighting for winget commands
image

Actual behavior

Windows Terminal on the contrary have too similar (white vs light grey) colors, no matter predefined color scheme.
image

Environment

Windows Package Manager v0.4.11391 Vorschau
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.21387.1
Paket: Microsoft.DesktopAppInstaller v1.11.11391.0

Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Any other software?
Windows Terminal
Version: 1.8.1444.0

Windows Terminal Preview
Version: 1.9.1445.0

@ghost ghost added the Needs-Triage Issue need to be triaged label May 25, 2021
@denelon
Copy link
Contributor

denelon commented May 25, 2021

Several challenges arise when users customize their colors. We defaulted to "bold" so we could retain "high contrast". We will have to look further into accessibility concerns here.

@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels May 25, 2021
@denelon denelon added this to the Backlog - Windows Package Manager milestone May 25, 2021
@Karl-WE
Copy link
Contributor Author

Karl-WE commented May 25, 2021

Thank you @denelon I have tried all the default color presets in Terminal and don't see a difference.
Maybe someone at @cinnamon-msft team could doublecheck this with the default colors (Windows 10 Insider Dev 21387 set to dark mode maybe this makes a change?

@DHowett
Copy link
Member

DHowett commented May 26, 2021

@Karl-WE winget is requesting "default color, bold/bright". The default color is, in every terminal emulator pretty much everywhere, some shade of gray. The bold/bright variety of that color is white. Pretty universally 😄

The default color schemes of Terminal do in fact have white in the "white" slot. This is equally true of the Windows PowerShell color scheme outside of Terminal. There is no variation by system color scheme.

Hope that helps!

@DHowett
Copy link
Member

DHowett commented May 26, 2021

Ah, but the confounding factor is this:

In the default "Windows PowerShell" color scheme, they have replaced dark yellow with gray (therefore deleting dark yellow from the palette completely) and the "bright" version of that is, of course, bright yellow. They then set the "default color" to be dark yellow. Which is rendered as gray.

This is widely regarded as a bug and as a significant mistake, and they've already stopped doing it with the default configuration of PowerShell (6.0+).

@DHowett
Copy link
Member

DHowett commented May 26, 2021

image

image

The "corrupted" colors are NORMAL/3 and NORMAL/5. When winget says "Brighten the color" it gets BRIGHT/3. This only works because Windows PowerShell's default colors are damaged.

If you run it form cmd, it won't be highlighted in yellow:

image

😄

@Karl-WE
Copy link
Contributor Author

Karl-WE commented May 26, 2021

@DHowett good to know Dustin. So how should we carry on with this PR?

@DHowett
Copy link
Member

DHowett commented May 26, 2021

If I had to make an official recommendation -- which I cannot, as this isn't my repo 😄 -- I'd say "Brightening or boldening the user's default color is an acceptable way to make it stand out; there isn't anything further to do here."

If the team wants to ensure that it is always bright white or bright yellow (regardless of the user's background color, which is unknowable and this can get you into trouble) I'd suggest they use \e[93m ("bright yellow", explicitly, without bold).

This is going to become at least moderately annoying when Terminal finally has support for bold text instead of bright text, because it will be the same amount of gray or yellow or what-have-you but just bold.

@Karl-WE
Copy link
Contributor Author

Karl-WE commented May 26, 2021

I see you Dustin, I would not pin it to a fixed color, who knows that has a weakness and even wants a yellow background in Terminal / Console or stuff.

We also should consider to test it with the Windows 10 color weakness modes or the high contrast colors (my old dad uses this mode).

I am aware that's a high goal for MSFT to have inclusion and help people with disabilities so that's why I flagged this in the first place.

@DHowett
Copy link
Member

DHowett commented May 26, 2021

In an ideal world, Terminal itself would have some colormetric algorithm for resolving contrast issues. There are a couple of them that exist already and as simple mathematical transformations we should be able to use them. We're tracking adding support for one at microsoft/terminal#2638.

High Contrast mode could bump up the required delta between colors. That would be clever, and perhaps it would work too.

@denelon denelon added the Area-Accessibility Issue related to accessibility label May 26, 2021
@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

[Policy] Area-Output

@microsoft-github-policy-service microsoft-github-policy-service bot added the Area-Output Issue related to CLI output label Jun 16, 2023
@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

@denelon denelon removed this from the Backlog-Client milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issue related to accessibility Area-Output Issue related to CLI output Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

4 participants