Skip to content
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

In Solarized themes, some things aren't visible in powershell #6696

Closed
jszabo98 opened this issue Jun 26, 2020 · 5 comments
Closed

In Solarized themes, some things aren't visible in powershell #6696

jszabo98 opened this issue Jun 26, 2020 · 5 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@jszabo98
Copy link

jszabo98 commented Jun 26, 2020

Environment

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Steps to reproduce

Set theme to Solarized Dark or Solarized Light and run Powershell.

Expected behavior

For Solarized Light, I expect to be able to see numbers and members. For Solarized Dark, I expect to be able to see operators and parameters.

Actual behavior

I cannot.

In Solarized Light, bright white is set to the same color as the background. So any token set to bright white becomes invisible. This is from get-psreadlineoptions:

Member             "$([char]0x1b)[97m" # bright white
Number             "$([char]0x1b)[97m" # bright white

In Solarized Dark, bright black is set to the same color as the background. So any token set to bright black becomes invisible. This is from get-psreadlineoptions:

Operator           "$([char]0x1b)[90m" # bright black
Parameter          "$([char]0x1b)[90m" # bright black

A workaround for Solarized Light (console colors and ansi colors have slightly different names):

if (test-path env:wt_session) { set-psreadlineoption -colors @{member =
  'darkblue'; number = 'red'}}

I didn't understand how the themes "redefine" colors like black, red, green, etc. This could be better explained in the docs for schemes.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 26, 2020
@DHowett
Copy link
Member

DHowett commented Jun 26, 2020

/dup #6424 #6390 #6286 #6283 #6208 #6121 #6061 #5896, resolved by #6617 #6618 #6489 (all three are currently in review)

@ghost
Copy link

ghost commented Jun 26, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jun 26, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 26, 2020
@jszabo98
Copy link
Author

jszabo98 commented Jun 26, 2020

Thanks. Fyi, here's the commonly used ansi colors in powershell:

Command            "$([char]0x1b)[31m" red # 93 bright yellow
Comment            "$([char]0x1b)[32m" green
ContinuationPrompt "$([char]0x1b)[37m" white # 33 yellow
DefaultToken       "$([char]0x1b)[37m" white
Emphasis           "$([char]0x1b)[96m" bright cyan
Error              "$([char]0x1b)[91m" bright red
Keyword            "$([char]0x1b)[92m" bright green
Member             "$([char]0x1b)[97m" bright white
Number             "$([char]0x1b)[97m" bright white
Operator           "$([char]0x1b)[90m" bright black
Parameter          "$([char]0x1b)[90m" bright black
Selection          "$([char]0x1b)[30;47m" black on white # 35;43 magenta;yellow
String             "$([char]0x1b)[36m" cyan
Type               "$([char]0x1b)[37m" white
Variable           "$([char]0x1b)[92m" bright green

@jszabo98
Copy link
Author

Maybe you should leave one of these open? People are less likely to search closed issues and pull requests.

@SubaruArai
Copy link

For anyone coming here from googling, #14859 is an ongoing issue tracker for light themes overall.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants