-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Something is, well, probably fine with One half light #15452
Comments
I knew I hadn't had enough coffee: My version of ColorTool is wrong here - dark white in One Half Light is white. Colortool is doing the "oh yea sure dark white is just the default color" thing cause it was written for the Console API. Configuring a light colored theme from the powershell docs is probably the solution here |
If PSReadLine implicitly assumes that "white" = white and "black" = black, why doesn't it implicitly assume that the default foreground It can be hot fixed by adding this to Set-PSReadLineOption -Colors @{
ContinuationPrompt = "`e[39m"
Default = "`e[39m"
Type = "`e[39m"
} and enabling |
I mean, it probably should. MicrosoftDocs/PowerShell-Docs#9358 was one of the earlier discussions. I forget why we came to the conclusion that couldn't be the default in PsReadline. For reference: terminal/src/cascadia/TerminalSettingsModel/defaults.json Lines 172 to 193 in 3c3b1aa
Are we horrifically morally opposed to manually setting the |
@j4james A long time ago you pointed out that we shouldn't adjust the contrast of colors when they're identical (like with the concealed attribute). Would this still work if we used a hardcoded 16 color index table that isn't influenced by the user's theme? 1 That way, when a light color scheme is used, we'd still consider Footnotes
|
I think there's value in separating out the "conceal" vs "colors are the same" cases. We no longer have to act like the only data we have at the point of color selection is the raw values of foreground and background (thanks to James fixing #2661), so we could totally understand this case1 separately from the same color case. Now, I really do wonder how many applications meaningfully display actual text in the same foreground as background (rather than spaces or whatever) and why on earth they're doing that 😄 Footnotes
|
I'm not sure I've seen this in practice, but I can certainly think of hypothetical reasons for it. For example, you might write out content as black-on-black to hide spoilers, and then later reveal that content with |
We've been discussing this and felt like it'd be better to only conceal text if it has the conceal attribute - Even though we think you're actually completely right @j4james. 😅 It's just that only handling |
That's cool. I don't feel strongly about it, as long as it's not enabled by default. Back when we were first discussing this feature, I had hoped we could get by with a very light adjustment - just enough to make the crap color schemes usable - and for that I thought it best to try and remain as "correct" as possible. But now it's clearly an accessibility feature with a very noticeable change. So I think if you're enabling the color adjustment now, you've got to expect that there could be edge cases where things may not look quite right. |
I know I'm kinda blundering into a long-standing discussion, but I've been observing this conversation from the sidelines for a bit - Is this an issue that affects basically every light theme across basically every terminal emulator? In my experience, color schemes define ANSI colors like So I'd expect a light-mode color scheme to actually lie: That isn't the case here, for any of the builtin themes:
So is this an issue that has affected every light theme across every terminal emulator that uses colors? |
It absolutely is! But there's some nuance. There are two (occasionally three) additional colors in the standard color palette for compliant terminal emulators: foreground1 and background. Those are intended to be the ground truth: the user's preferred foreground and background. Almost all terminal emulators that ship light color schemes by default set their foregrounds to dark. Those are the colors you see in the The issue arises when applications request ANSI white by name. It's arguably wrong to make that anything but white. PSReadline is in a weird position, where it is trying to bridge the gap between the Windows Console API2 and modern terminal emulation and color schemes. It doesn't always know that the palette is 18 colors (all 16 plus fg, bg)... and sometimes limits its choice to 16. That worked perfectly fine when the Windows Console only supported 16 😉. Footnotes
|
It's worth noting that some apps will try to detect whether you're using a light color scheme (by querying the palette values), and then adjust their colors appropriately. This is not yet supported in Windows Terminal though. |
Can someone suggest a workaround for people who often switch between light and dark themes and schemes? I use AutoDarkMode to switch my Windows theme between dark and light based on time of day. I set up my WT to switch between a dark and light colour scheme (Material Darker and One Half Light), and I would like to be able to read all text in both modes. The two issues I'm running into are as follows:
Apparently those lines are not default (they're not in the output of Both of these happen even when Regardless, is there something I can do in my WT setup that will fix (or work around) both issues? While individual workarounds (e.g. PSReadLine colour settings, and changing my Edit: for now I've used the hotfix suggested by lhecker, updating some PSReadLine colors to Another edit: I've added Set-PSReadLineOption -Colors @{
ContinuationPrompt = "`e[39m"
Default = "`e[39m"
Type = "`e[39m"
Member = "`e[39m"
Number = "`e[39m"
} |
I face the same issue with light mode & one half light any eta for this bug? Moreover, could someone explain where exactly to put this:
I tried to $Profile.CurrentUserCurrentHost But I can not find the profile.ps1 file (I have a new pc with a fresh install of Windows 11 latest stable build) |
@itayasaf2002xd
It does not exist by default (it is optional, for user customizations). Note that legacy |
From a mail thread with @jazzdelightsme and @oldnewthing
This is Terminal 1.18, with One Half Light. I’ve typed
git do the thing
.Left:
"adjustIndistinguishableColors": "never",
right:
"adjustIndistinguishableColors": "always",
wait, what’s going on here?
And the output of conpty looks pretty normal, too. After typing the
o
ingit do
, Terminal gets:␛[?25l␛[93m␛[36;27Hgit␣␛[37mdo␣␣␛[36;33H␛[?25h␛[m
Which is basically:
• Turn cursor off
• Use bright yellow FG
• Cursor to the start of the prompt
• “git “
• Use dark white FG
• “do “ (two spaces)
• Move the cursor back a space, turn it back on, and reset the colors.
Which is exactly what I’d expect. So why is that appearing as white, and not black (which is what bright white is defined as) from the scheme?
Maybe I haven’t had enough coffee yet this morning.
Trawling through the colortool output, I noticed:
37m
line doesn't actually set the foreground color - I think it's relying on the7
== "default index" thing.Maybe this is related to #15408
The text was updated successfully, but these errors were encountered: