-
Notifications
You must be signed in to change notification settings - Fork 319
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
N/AScreenshot
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
PS Version: 7.3.0
PS HostName: ConsoleHost
PSReadLine Version: 2.2.6
PSReadLine EditMode: Windows
OS: 10.0.22621.1 (WinBuild.160101.0800)
BufferWidth: 148
BufferHeight: 19Steps 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.



