Open papadeltasierra opened 1 year ago
I have tried changing the colour scheme
I think you can change PSReadline options:
Get-PSReadlineOption
Set-PSReadlineOption -Color @{
ListPrediction = "Green"
ListPredictionSelected = "Red"
ListPredictionTooltip = "`e[38;5;95m"
}
Any colors. The example colors is just example.
@237dmitry Thank you so much! Excellent tip! Doesn't let MS off the hook for not having a default accessibility compatible scheme of course but does help work around it ;-).
@papadeltasierra Can you please upgrade to v2.3.4 of PSReadLine? We updated the default inline prediction color to provide more contrast, and I'd love to know how that works for you.
To upgrade, simply run this command:
Install-Module -Name PSReadLine -Repository PSGallery -Scope CurrentUser -RequiredVersion 2.3.4 -Force
Sorry, didn't spot the prompt for feedback in amongst all the other GitHub SPAM I received from Microsoft. I did the upgrade but the colours appear to be identical, in fact it backed out my change to the prediction colour setting and set if back to the unreadable pale colour. Microsoft has some open-source tools that check for accessibility (in this case mainly contrast that I tried against some of the colours and let's just say the tool was not impressed.
Also don't see the "Reopen Issue" button on this page - is it disabled?
@papadeltasierra thanks for replying back. Can you please share your changes to the prediction color setting, so that we know what color settings work for you?
The one I used was this:
InlinePredictionColor : "
e[97;2;3m"`
It is the same as ListPredictionTooltipColor
but I can live with that.
I do appreciate that it can be nice to have colours but colours are one of the things I hate most about people doing helpful things to Linux consoles for example. They often enable colours without realising that colourblind folk sometimes cannot read the new colours text. The Microsoft tools seem to be quite good at making a decision as to what colour combinations will work and which won't and if you are able to access it, the https://accessibilityinsights.io/ tool can check all the colours for you (you might have to do this one by one) and give you a idea of what is good, or not. I ran it by running Get-PSReadLineOption
and then checking some of the example coloured text to get an idea of what it thought. Maybe you just need "black-and-white" , and one or more colour blind options for the colour palates. Apparently there are at least three different types so I might not be red/green colourblind, but just reduced red or reduce green! https://www.colourblindawareness.org/colour-blindness/types-of-colour-blindness/. There are also tools that fiddle with display colours to simulate colourblindness for regular folk, which are fun to use to show regular folk why that lovely green/red pattern map they have created is just a solid grey blob to some users :-).
Thanks for taking an interest in this.
Paul DS
@papadeltasierra Thank you so much for your detailed reply! Accessibility is of high importance to us and admittedly, we are not doing very good about it in PSReadLine today. The information you provided here will be very helpful to us.
BTW, you mentioned that the inline prediction color works for you is e[97;2;3m
, but that's exactly the default color for InlinePredictionColor
in v2.3.4 version of PSReadLine. Does that mean the default inline prediction color in v2.3.4 works better for you? (of course, this by no means satisfies the accessiblity requirement. like you said, we should have a color theme or themes for colorblind users)
Sorry, looks like I somehow lost my change. Fortunately I was able to find the history and the selection I went with was "`e[96m`e[48;5;238m"
Somewhat garish to many eyes I suspect but my wife will attest that my choice of colours is not to everyone's taste ;-).
Prerequisites
Steps to reproduce
PowerShell 7.3.7. Use some commands and trigger "hint" text. For example see the image below:
As someone who is slightly colourblind, I can barely see the help text and it certainly does not pass accessibility guidelines according to Accessibility Insights for Windows.
I have tried changing the colour scheme but they all seem to suffer from similar issues and I could not find one that made all the test have a good contrast.
Expected behavior
Actual behavior
Error details
Environment data
Visuals