You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started seeing this feature described in #1468 and n noticed that it has hardcoded indexed color 238 (#444444), if you only set the foreground color to a fixed color it will have wildly varying levels of contrast depending on the terminal theme's background color, unless you also set the background color.
Prediction looks like it's regular input with #fff bg, #444 fg:
I notice you can set the color manually via Set-PSReadLineOption -Colors @{ Prediction = '#8A0303'} but saying this is a good default and enough is a copout imo. Some users won't even know it's a feature because they can't see the text, and some users will think the shell is broken because it looks like regular text.
VS Code's minimum contrast feature actually prevents this contrast issue, however it brings another problem where it can more easily look like the default text color:
Considering this case, I think you should use the dim attribute by default to style the text while still allowing manual tweaking in psreadline options and in xterm.js we should exclude the dim attribute from the minimum contrast demands (or halve them).
Prerequisites
Exception report
N/A
Screenshot
cc @daxian-dbw @SteveL-MSFT
I just started seeing this feature described in #1468 and n noticed that it has hardcoded indexed color 238 (
#444444
), if you only set the foreground color to a fixed color it will have wildly varying levels of contrast depending on the terminal theme's background color, unless you also set the background color.Prediction looks like it's regular input with
#fff
bg,#444
fg:xterm.js' default demo theme is extremely low contrast,
#2D2E2C
bg,#F8F8F8
fg:Prediction is invisible with
#444
bg color:I notice you can set the color manually via
Set-PSReadLineOption -Colors @{ Prediction = '#8A0303'}
but saying this is a good default and enough is a copout imo. Some users won't even know it's a feature because they can't see the text, and some users will think the shell is broken because it looks like regular text.VS Code's minimum contrast feature actually prevents this contrast issue, however it brings another problem where it can more easily look like the default text color:
Considering this case, I think you should use the dim attribute by default to style the text while still allowing manual tweaking in psreadline options and in xterm.js we should exclude the dim attribute from the minimum contrast demands (or halve them).
Environment data
Steps to reproduce
Type
git
Expected behavior
The prediction has reasonable contrast and is differentiated enough from the default foreground color, regardless of the terminal's background color.
Actual behavior
It can range from completely invisible to identical to the regular input.
The text was updated successfully, but these errors were encountered: