Skip to content

Commit

Permalink
Format color values so they don't get localized (#10462)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwheeler authored Sep 26, 2023
1 parent e9f7059 commit 0180d78
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 202 deletions.
74 changes: 37 additions & 37 deletions reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 12/12/2022
ms.date: 09/26/2023
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Write-Host
Expand All @@ -24,10 +24,10 @@ Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundC
## DESCRIPTION

The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as
printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
`Write-Host` uses the [ToString()](/dotnet/api/system.object.tostring) method to write the
output. By contrast, to output data to the pipeline, use [Write-Output](Write-Output.md) or implicit
output.
printing colored text like when prompting the user for input in conjunction with
[Read-Host](Read-Host.md). `Write-Host` uses the [ToString()](/dotnet/api/system.object.tostring)
method to write the output. By contrast, to output data to the pipeline, use
[Write-Output](Write-Output.md) or implicit output.

You can specify the color of text by using the `ForegroundColor` parameter, and you can specify the
background color by using the `BackgroundColor` parameter. The Separator parameter lets you specify
Expand Down Expand Up @@ -122,22 +122,22 @@ thereby suppresses it. For more information, see

Specifies the background color. There is no default. The acceptable values for this parameter are:

- Black
- DarkBlue
- DarkGreen
- DarkCyan
- DarkRed
- DarkMagenta
- DarkYellow
- Gray
- DarkGray
- Blue
- Green
- Cyan
- Red
- Magenta
- Yellow
- White
- `Black`
- `DarkBlue`
- `DarkGreen`
- `DarkCyan`
- `DarkRed`
- `DarkMagenta`
- `DarkYellow`
- `Gray`
- `DarkGray`
- `Blue`
- `Green`
- `Cyan`
- `Red`
- `Magenta`
- `Yellow`
- `White`

```yaml
Type: System.ConsoleColor
Expand All @@ -156,22 +156,22 @@ Accept wildcard characters: False
Specifies the text color. There is no default. The acceptable values for this parameter are:
- Black
- DarkBlue
- DarkGreen
- DarkCyan
- DarkRed
- DarkMagenta
- DarkYellow
- Gray
- DarkGray
- Blue
- Green
- Cyan
- Red
- Magenta
- Yellow
- White
- `Black`
- `DarkBlue`
- `DarkGreen`
- `DarkCyan`
- `DarkRed`
- `DarkMagenta`
- `DarkYellow`
- `Gray`
- `DarkGray`
- `Blue`
- `Green`
- `Cyan`
- `Red`
- `Magenta`
- `Yellow`
- `White`

```yaml
Type: System.ConsoleColor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes the features of PowerShell that use ANSI escape sequences and the terminal hosts that support them.
Locale: en-US
ms.date: 06/30/2023
ms.date: 09/26/2023
schema: 2.0.0
title: about ANSI terminals
---
Expand Down Expand Up @@ -91,22 +91,22 @@ The following members control how or when ANSI formatting is used:
- The `$PSStyle.Background` and `$PSStyle.Foreground` members are strings that
contain the ANSI escape sequences for the 16 standard console colors.

- **Black**
- **BrightBlack**
- **White**
- **BrightWhite**
- **Red**
- **BrightRed**
- **Magenta**
- **BrightMagenta**
- **Blue**
- **BrightBlue**
- **Cyan**
- **BrightCyan**
- **Green**
- **BrightGreen**
- **Yellow**
- **BrightYellow**
- `Black`
- `BrightBlack`
- `White`
- `BrightWhite`
- `Red`
- `BrightRed`
- `Magenta`
- `BrightMagenta`
- `Blue`
- `BrightBlue`
- `Cyan`
- `BrightCyan`
- `Green`
- `BrightGreen`
- `Yellow`
- `BrightYellow`

The values are settable and can contain any number of ANSI escape sequences.
There is also a `FromRgb()` method to specify 24-bit color. There are two
Expand All @@ -118,7 +118,7 @@ The following members control how or when ANSI formatting is used:
```

Either of the following examples set the background color the 24-bit color
**Beige**.
`Beige`.

```powershell
$PSStyle.Background.FromRgb(245, 245, 220)
Expand Down
74 changes: 37 additions & 37 deletions reference/7.2/Microsoft.PowerShell.Utility/Write-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 12/12/2022
ms.date: 09/26/2023
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Write-Host
Expand All @@ -24,10 +24,10 @@ Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundC
## DESCRIPTION

The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as
printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
`Write-Host` uses the [ToString()](/dotnet/api/system.object.tostring) method to write the
output. By contrast, to output data to the pipeline, use [Write-Output](Write-Output.md) or implicit
output.
printing colored text like when prompting the user for input in conjunction with
[Read-Host](Read-Host.md). `Write-Host` uses the [ToString()](/dotnet/api/system.object.tostring)
method to write the output. By contrast, to output data to the pipeline, use
[Write-Output](Write-Output.md) or implicit output.

You can specify the color of text by using the `ForegroundColor` parameter, and you can specify the
background color by using the `BackgroundColor` parameter. The Separator parameter lets you specify
Expand Down Expand Up @@ -122,22 +122,22 @@ thereby suppresses it. For more information, see

Specifies the background color. There is no default. The acceptable values for this parameter are:

- Black
- DarkBlue
- DarkGreen
- DarkCyan
- DarkRed
- DarkMagenta
- DarkYellow
- Gray
- DarkGray
- Blue
- Green
- Cyan
- Red
- Magenta
- Yellow
- White
- `Black`
- `DarkBlue`
- `DarkGreen`
- `DarkCyan`
- `DarkRed`
- `DarkMagenta`
- `DarkYellow`
- `Gray`
- `DarkGray`
- `Blue`
- `Green`
- `Cyan`
- `Red`
- `Magenta`
- `Yellow`
- `White`

```yaml
Type: System.ConsoleColor
Expand All @@ -156,22 +156,22 @@ Accept wildcard characters: False
Specifies the text color. There is no default. The acceptable values for this parameter are:
- Black
- DarkBlue
- DarkGreen
- DarkCyan
- DarkRed
- DarkMagenta
- DarkYellow
- Gray
- DarkGray
- Blue
- Green
- Cyan
- Red
- Magenta
- Yellow
- White
- `Black`
- `DarkBlue`
- `DarkGreen`
- `DarkCyan`
- `DarkRed`
- `DarkMagenta`
- `DarkYellow`
- `Gray`
- `DarkGray`
- `Blue`
- `Green`
- `Cyan`
- `Red`
- `Magenta`
- `Yellow`
- `White`

```yaml
Type: System.ConsoleColor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes the features of PowerShell that use ANSI escape sequences and the terminal hosts that support them.
Locale: en-US
ms.date: 06/30/2023
ms.date: 09/26/2023
schema: 2.0.0
title: about ANSI terminals
---
Expand Down Expand Up @@ -91,22 +91,22 @@ The following members control how or when ANSI formatting is used:
- The `$PSStyle.Background` and `$PSStyle.Foreground` members are strings that
contain the ANSI escape sequences for the 16 standard console colors.

- **Black**
- **BrightBlack**
- **White**
- **BrightWhite**
- **Red**
- **BrightRed**
- **Magenta**
- **BrightMagenta**
- **Blue**
- **BrightBlue**
- **Cyan**
- **BrightCyan**
- **Green**
- **BrightGreen**
- **Yellow**
- **BrightYellow**
- `Black`
- `BrightBlack`
- `White`
- `BrightWhite`
- `Red`
- `BrightRed`
- `Magenta`
- `BrightMagenta`
- `Blue`
- `BrightBlue`
- `Cyan`
- `BrightCyan`
- `Green`
- `BrightGreen`
- `Yellow`
- `BrightYellow`

The values are settable and can contain any number of ANSI escape sequences.
There is also a `FromRgb()` method to specify 24-bit color. There are two
Expand All @@ -118,7 +118,7 @@ The following members control how or when ANSI formatting is used:
```

Either of the following examples set the background color the 24-bit color
**Beige**.
`Beige`.

```powershell
$PSStyle.Background.FromRgb(245, 245, 220)
Expand Down
Loading

0 comments on commit 0180d78

Please sign in to comment.