11---
22description : >
33 This article shows how to configure PSReadLine color settings for a light themed terminal.
4- ms.date : 11/21 /2025
4+ ms.date : 12/09 /2025
55title : Configuring a light colored theme
66---
77# Configuring a light colored theme
@@ -11,6 +11,14 @@ terminal. However, some users might choose to use a light background with dark t
1111the default colors don't set the background, using light foreground colors on a light background
1212produces unreadable text.
1313
14+ Beginning in PowerShell 7.2, PowerShell adds colorized output to the default console experience. The
15+ ` $PSStyle ` feature is not natively available in Windows PowerShell. However, using the [ PSStyle] [ 05 ]
16+ module from the PowerShell Gallery, you can set color values using these same techniques described
17+ in this article.
18+
19+ The colors used are defined in the ` $PSStyle ` variable and are designed for a dark background. You
20+ can change these colors to work better for a light background terminal.
21+
1422** PSReadLine** allows you to define colors for 18 different syntax elements. You can view the
1523current settings using the ` Get-PSReadLineOption ` cmdlet.
1624
@@ -96,13 +104,9 @@ $ISETheme = @{
96104```
97105
98106> [ !NOTE]
99- > In PowerShell 7.2 and higher you can use the ` FromRGB() ` method of ` $PSStyle ` to create the ANSI
100- > escape sequences for the colors you want.
101- >
102- > For more information about ` $PSStyle ` , see [ about_ANSI_Terminals] [ 01 ] .
103- >
104- > For more information about ANSI escape sequences, see the [ ANSI escape code] [ 04 ] article in
105- > Wikipedia.
107+ > You can use the ` $PSStyle.FromRGB() ` method to create the ANSI escape sequences for the colors you
108+ > want. For more information about ` $PSStyle ` , see [ about_ANSI_Terminals] [ 01 ] . For more information
109+ > about ANSI escape sequences, see the [ ANSI escape code] [ 04 ] article in Wikipedia.
106110
107111## Setting the color theme in your profile
108112
@@ -116,9 +120,7 @@ Add the `$ISETheme` variable and the following `Set-PSReadLineOption` command to
116120Set-PSReadLineOption -Colors $ISETheme
117121```
118122
119- Beginning in PowerShell 7.2, PowerShell adds colorized output to the default console experience. The
120- colors used are defined in the ` $PSStyle ` variable and are designed for a dark background. The
121- following settings work better for a light background terminal.
123+ The following settings work better for a light background terminal.
122124
123125``` powershell
124126$PSStyle.Formatting.FormatAccent = "`e[32m"
@@ -144,10 +146,10 @@ $PSStyle.FileInfo.Extension['.psm1'] = "`e[36m"
144146The ISE color theme might not work for users with color-blindness or other conditions that limit
145147their ability to see colors.
146148
147- The [ World Wide Web Consortium (W3C)] [ 05 ] has recommendations for using colors for accessibility.
149+ The [ World Wide Web Consortium (W3C)] [ 06 ] has recommendations for using colors for accessibility.
148150The Web Content Accessibility Guidelines (WCAG) 2.1 recommends that "visual presentation of text and
149151images of text has a contrast ratio of at least 4.5:1." For more information, see
150- [ Success Criterion 1.4.3 Contrast (Minimum)] [ 06 ] .
152+ [ Success Criterion 1.4.3 Contrast (Minimum)] [ 07 ] .
151153
152154The [ Contrast Ratio] [ 03 ] website provides a tool that lets you pick foreground and background
153155colors and measure the contrast. You can use this tool to find color combinations that work best for
158160[ 02 ] : creating-profiles.md
159161[ 03 ] : https://contrast-ratio.com/
160162[ 04 ] : https://en.wikipedia.org/wiki/ANSI_escape_code
161- [ 05 ] : https://www.w3.org/
162- [ 06 ] : https://www.w3.org/TR/WCAG/#contrast-minimum
163+ [ 05 ] : https://www.powershellgallery.com/packages/PSStyle
164+ [ 06 ] : https://www.w3.org/
165+ [ 07 ] : https://www.w3.org/TR/WCAG/#contrast-minimum
0 commit comments