_From @garegin16 on September 4, 2016 14:53_
I didn't try other linuxes, but the default typing color for centos 7 in gnome terminal is yellow.
_Copied from original issue: PowerShell/PowerShell#2183_
_From @vors on September 5, 2016 18:47_
Does it look like these screenshots #1036 ?
_From @garegin16 on September 5, 2016 20:6_
Yes. It's even worse on my screen. It looks bright yellow. I can't see anything
_From @vors on September 5, 2016 20:9_
Can you post a screenshot?
As a workaround, you can set background color to black or anything dark.
_From @Jaykul on September 6, 2016 0:35_
Can we turn this into a request for PSReadline to detect the background and choose an appropriate default set of colors -- unless they have been set by the user?
For that matter, is there any chance that we could get PSReadline to use some sort of configuration file rather than needing a long profile script to set all the colors? Especially now that we have (potentially) access to 256 xterm colors or even 16bit full color, and/or support for bold, etc...
Yellow on white is not right,
Nor is blue on black.
Wise color choices are great.
_From @drwill-ms on September 17, 2016 2:13_
Same for me on OSX. Very bright yellow text on a white background. Only text I type.
_From @garegin16 on September 18, 2016 2:59_
Huh. It didn't do that on my os x install. The text is black by default.
Sent from my iPhone
On 16 Sep 2016, at 10:13 PM, David R. Williamson [email protected] wrote:
Same for me on OSX. Very bright yellow text on a white background. Only text I type.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
_From @SteveL-MSFT on November 1, 2016 19:2_
@Jaykul I like your suggestion, can you open an issue in http://github.com/lzybkr/psreadline
_From @fnvogt1954 on November 5, 2016 15:46_
Power Shell command background seems to take on the value of the most recently used color of the screen background.
Discovered this by accident.
I can see my yellow commands against a darker background. I was using white as my background, then I changed it to a darker green, too dark, so I lightened it up to a nice shade of blue. Screen Snippet attached ,
PS_Yellow_command_letters_on_dark_background.png.
Now that I have something that is workable, but not great, I am afraid to tweak it more, have to move on to more urgent work.
Major Minor Build Revision
5 1 14393 206
It looks like it is possible to detect the background color on CentOS and possibly other systems, see here. This will make it possible to create light and dark themes.
I am late to the party but I found the article which make your mac terminal window same like windows PowerShell. By Setting Profile. Please follow this below article
https://info.sapien.com/index.php/quickguides/setting-up-powershell-on-your-mac
changing the background color to the default dark blue it has on windows would solve the issue. the issue here is $Host.UI.RawUI.BackgroundColor
only takes colors of "System.ConsoleColor" which does not have this very blue. if pwsh would default to this background color (on linux) would be a huge win for every user.
If PSRL changed my terminal/console color from my preferred color scheme, I wouldn't be too happy with that.
If PSRL changed my terminal/console color from my preferred color scheme, I wouldn't be too happy with that.
I totally understand your point. but I am more annoyed when I cannot read/use pwsh. I would prefer a default that works - that can be changed to personal preferences. rather than having to figure out why one cannot read/work with pwsh and how to change it to be readable. especially for new users this feels like a huge gap.
I think one way to solve this is to have themes support which includes the background color. You can set it once in your profile. It doesn't seem there is a universal way to programmatically get the current background color across all distros/OS's so I don't think we should try to solve that problem. We can start with dark, light, and Windows PowerShell themes.
I think theme support would be great, but I wonder if that belongs in PSReadLine or elsewhere.
Note there are other projects introducing themes, e.g. https://github.com/mmims/PSConsoleTheme and maybe @jaykul has something else.
It would make sense to be separate if it works independently and cross-platform. Unfortunately, PSConsoleTheme
is currently Windows only.
Console themes are a mess. Add in Windows PowerShell's weird custom color scheme, and it's a nearly unfixable mess.
On Windows, traditionally, you can set the 16-color palette using proprietary APIs -- which is why PSConsoleTheme et. al. are Windows-only. The current beta of Pansies has (Windows-only) themes that use those Windows-only APIs and include support for PSReadLine and the PowerShell default error/warning colors, etc. They work fine, but ...
The only way there ever will be, is to use the OSC
escape sequences to set the console palette, but that would require full implementations of OSC4
, OSC10
and OSC11
on Windows and on all the third-party terminals you wanted to support. We need all three to be able to to set the palette and choose the default foreground and background colors -- additionally, we would need QUERY support to be able to detect the background color without explicitly setting it.
Unfortunately, that support just isn't there in most places. According to the superuser thread @lzybkr linked earlier, they work in some versions of xTerm, but they don't work in the default Ubuntu terminal. On Windows (even in tmux) only the OSC4
is implemented, but without query support and with no documentation (well, one of my teammates added some documentation for Windows, but it's just what we were able to discover on our own).
Without query support, and with no way to set the default background and foreground, we would just have to assume that the background is 0 (black), and foreground is 15 (white) -- which results in really awful, pink backgrounds with yellow text in the default Windows PowerShell window, because it abused those color indexes for it's dark blue background and light gray foreground instead of using the actual dark blue and light gray color indexes.
Even without taking operating systems into account, there's no way to change or detect the 16-color palette that works reliably across terminal apps. On Windows 10 the new escape sequences work on the same level as the APIs, so they have no effect in ConEmu or Console2 or Hyper ... each of which has it's own way to handle it. On Linux and Mac different terminals have different implementations -- as you can see on the superuser thread 😖
For what it's worth, my intention is to alter the theme support in PANSIES with support for sending the escape sequences on non-Windows platforms, in hopes that they'll work cross-platform. I may also take that functionality into a separate module, because themes don't necessarily need Windows 10 or RGB support 😉