-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Ship a sensible default light color scheme #14859
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Alrighty there's a lot to unpack here. Forst off - the selection thing is tracked in #8716, so I won't touch that. You're right that the "One Half Light" colors are fairly hard to read. Here's OHL vs OHD: Looks like we got those schemes from https://github.com/sonph/onehalf. Not sure if they've been updated since, maybe that's something to take a look at. I think we initially tried to ship some halfway decent, inoffensive schemes, but alas, pretty much all of them have burned us. I'm gonna just take this as an action item for "ship a sensible default light scheme". It can probably just be "Campbell Light", with the As an addenda, @DHowett mentioned correctly that we should probably figure out "don't put all the default color schemes in the user's settings file" before shipping this. I believe he had a WIP PR over in #12800. That PR also attempted to remove the default schemes from the user's file, if they were left there by an earlier version ("healing" the file). That's probably the hardest part. |
Neat! One thing I wonder: The color scheme only seems(??) to include 16 colors; is it worth worrying about what if an app (Linux or Windows) uses ANSI color codes 16 through 255? For example if your scheme only rewrites 0-15, then background 15 and foreground 16 might look like black on black. |
There are base 16 console colors, plus foreground, background, selection and cursor. Color scheme replaces these 16 colors with their own.
A palette of 256 colors is given for convenience, this is the generally accepted standard. In practice, this palette is enough for the console, but no one forbids the use of RGB colors. |
I think a solution of changing the expected colors as implemented by Apple's Terminal is at most a workaround that should not be considered as the end of the problem. Of course an inverted mode should still be included as a feature, but the big underlying issue is that there is no convention on how to tell command line shells and programs whether to use light or dark mode. However, terminals and programs have become aware of it and have proposed different solutions. The xterm and the vte library specify However, both of these solutions aren't widely supported. I still suggest implementing them in Windows Terminal (if they aren't already implemented), because "be the change you want to see". |
@Tojaw the OSC10 (et al) queries are tracked in #3718 |
The problem is that there's no readable default Light Mode color scheme. One Half Light results in ".." in powershell being invisible. Tango Light uses light gray for concrete typing but dark for autocomplete which is confusing. Is this an issue with powershell using colors by name instead of role? |
I've made a few fixes to colors that made it impossible to work.
|
Could I bring to your attention This was born during PSConfEU as no one had a good light theme to present on the big "screen". I think this would be very handy if included in the default install - to be used on throw-away virtual machines created for conference demos. I am not really sure how could I submit a PR with this, but with some direction I'd be happy to create one! |
…a overlay (#17725) With the merge of #17638, selections are now accumulated early in the rendering process. This allows Atlas, which currently makes decisions about cell foreground/background at the time of text rendering, awareness of the selection ranges *before* text rendering begins. As a result, we can now paint the selection into the background and foreground bitmaps. We no longer need to overlay a rectangle, or series of rectangles, on top of the rendering surface and alpha blend the selection color onto the final image. As a reminder, "alpha selection" was always a stopgap because we didn't have durable per-cell foreground and background customization in the original DxEngine. Selection foregrounds are not customizable, and will be chosen using the same color distancing algorithm as the cursor. We can make them customizable "easily" (once we figure out the schema for it) for #3580. `ATLAS_DEBUG_SHOW_DIRTY` was using the `Selection` shading type to draw colored regions. I didn't want to break that, so I elected to rename the `Selection` shading type to `FilledRect` and keep its value. It helps that the shader didn't have any special treatment for `SHADING_TYPE_SELECTION`. This fixes the entire category of issues created by selection being an 80%-opacity white rectangle. However, given that it changes the imputed colors of the text it will reveal `SGR 8` concealed/hidden characters. Refs #17355 Refs #14859 Refs #11181 Refs #8716 Refs #4971 Closes #3561
Description of the new feature/enhancement
In #14844 there is an interesting comment from a Terminal team member:
Well, that is a little silly, but there's another way to address the silliness: what if the window contents were some color other than black?
I personally prefer black text on a light background for my terminals. However, Windows Terminal does not realistically support this. There is a "color schemes" feature and several included light themes, but they do not work with out-of-the-box Windows Services for Linux. By "do not work" I mean that the ubuntu defaults result in extremely light text on a white background, or dark text on a dark background. For example here's the One Half Light theme running "ls":
Look how difficult this is to read if there are one-letter directories:
I obtained all three of Windows Terminal, WSL, and One Half Light from Microsoft, but despite all being in some sense Microsoft products they are configured in a way that using the three at the same time does not work.
Moreover, selections are still white-background with One Half Light, so it's very hard to tell which areas are selected:
Proposed technical implementation details (optional)
I'm not sure I know exactly why this is happening and I don't know what the solution would be. Maybe there is a Terminal color scheme somewhere on the Internet that fixes it fully, maybe I can configure something within Bash to change the colors WSL outputs. But given MS Terminal does ship the One Half Light theme out of the box, it would be reasonable to expect it to work out of the box.
Moreover, I note Apple's Terminal.app does not have this problem without anything needing to be configured— it has a (default) light-on-black scheme and it works fine even when SSHing into remote servers where nothing has been preconfigured. I think the way Apple swung this was they silently invert the color of all foreground or background terminal colors. This probably makes multicolor ANSI art look wrong, but since that basically never comes up it is okay.
My "expected behavior" is that Terminal should ship with at least one color scheme with a light background that can be used without making things unreadable and without me needing to edit any JSON, whatever is necessary to make that happen.
The text was updated successfully, but these errors were encountered: