-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Doc to help users set PSReadLine colors and PowerShell colors for light themed terminal #9358
Comments
@SteveL-MSFT Do you have some sample themes we can document? |
For what it's worth, I wholeheartedly believe that the ¹ Terminals that do not support
² The benefit is, "nobody will ever complain about this again." That doesn't even account for all the people who just leave or change shells or never learn that there is documentation telling them the "right" way to "fix" it. 😄 |
@DHowett What do you think of these colors for a light theme? Most of these colors come directly from the ISE's light-mode configuration. $PSROptions = @{
Colors = @{
Command = $PSStyle.Foreground.FromRGB(0x0000FF)
Comment = $PSStyle.Foreground.FromRGB(0x006400)
ContinuationPrompt = $PSStyle.Foreground.FromRGB(0x0000FF)
Default = $PSStyle.Foreground.FromRGB(0x0000FF)
Emphasis = $PSStyle.Foreground.FromRGB(0x287BF0)
Error = $PSStyle.Foreground.FromRGB(0xE50000)
InlinePrediction = $PSStyle.Foreground.FromRGB(0x93A1A1)
Keyword = $PSStyle.Foreground.FromRGB(0x00008b)
ListPrediction = $PSStyle.Foreground.FromRGB(0x06DE00)
Member = $PSStyle.Foreground.FromRGB(0x000000)
Number = $PSStyle.Foreground.FromRGB(0x800080)
Operator = $PSStyle.Foreground.FromRGB(0x757575)
Parameter = $PSStyle.Foreground.FromRGB(0x000080)
String = $PSStyle.Foreground.FromRGB(0x8b0000)
Type = $PSStyle.Foreground.FromRGB(0x008080)
Variable = $PSStyle.Foreground.FromRGB(0xff4500)
ListPredictionSelected = $PSStyle.Background.FromRGB(0x93A1A1)
Selection = $PSStyle.Background.FromRGB(0x00BFFF)
}
}
Set-PSReadLineOption @PSROptions |
* Add article about using light themes * Fix broken link * fix typos * Apply suggestions from code review Co-authored-by: Mikey Lombardi (He/Him) <michael.t.lombardi@gmail.com> * Editorial changes Co-authored-by: Mikey Lombardi (He/Him) <michael.t.lombardi@gmail.com>
@sdwheeler hey, those look really good! |
Prerequisites
Get-Foo
cmdlet" instead of "New cmdlet."PowerShell Version
7.3
Summary
The default colors for both PowerShell and PSReadLine are built expecting a dark background. However, some users may choose to use a light background with dark text. However, most of the default colors don't set the background, so in some cases the light foreground with the light background makes that text invisible. Users may not be aware they can change their colors to make the text visible. It seems we should just have some sample PS script for setting colors appropriate for light themed terminals they can then put in their $profile.
Not sure if it makes sense to have this as part of the ANSI topic or separate as users would need to know about ANSI to find it.
Details
No response
Proposed Content Type
About Topic
Proposed Title
No response
Related Articles
No response
The text was updated successfully, but these errors were encountered: