-
Notifications
You must be signed in to change notification settings - Fork 296
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
Detect background color and use a light theme as appropriate #464
Comments
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, |
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
|
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. 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 |
changing the background color to the default dark blue it has on windows would solve the issue. the issue here is |
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, |
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 ... There is no way to make that cross-platform yet.The only way there ever will be, is to use the 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 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. Importantly, this is terminal-specific.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 😉 |
Tried it on a fresh Mac OS install with a white terminal background, PS cmdlets are yellow, .NET classes are pale grey and their properties are an even paler grey - it's pretty unusable! |
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
The text was updated successfully, but these errors were encountered: