Skip to content

Commit

Permalink
chore: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
chawyehsu authored Dec 24, 2024
1 parent 69c67e4 commit ce479e0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Prerequisites:

- Windows OS and you're using the [Windows Console]
- cmd.exe, powershell.exe, etc., that use `ConsoleHost` as the terminal
- Windows Terminal doesn't benefit from this as it's newly designed and not
using `ConsoleHost`
- Windows Terminal doesn't benefit from this as it's newly designed and has its
own settings for colors
- Enhanced ConsoleHost like `ConEmu` or `Cmder` doesn't benefit from this
either, as they have their own color settings
- [concfg] installed
Expand Down Expand Up @@ -69,24 +69,24 @@ it manually. Here is the mapping table.

_Please consider citing the source if you use this table in your project:_

| ANSI/VT Color | ANSI/VT FG Code | ANSI/VT BG Code | cmd.exe* | PowerShell** | ColorTable |
|----------------|-----------------|-----------------|--------------|---------------|------------|
| Black | \`e[30m | \`e[40m | Black | Black | 00 |
| Red | \`e[31m | \`e[41m | Red | DarkRed | 04 |
| Green | \`e[32m | \`e[42m | Green | DarkGreen | 02 |
| Yellow | \`e[33m | \`e[43m | Yellow | DarkYellow | 06 |
| Blue | \`e[34m | \`e[44m | Blue | DarkBlue | 01 |
| Magenta | \`e[35m | \`e[45m | Purple | DarkMagenta | 05 |
| Cyan | \`e[36m | \`e[46m | Aqua | DarkCyan | 03 |
| White | \`e[37m | \`e[47m | White | Gray | 07 |
| Bright Black | \`e[90m | \`e[100m | Gray | DarkGray | 08 |
| Bright Red | \`e[91m | \`e[101m | Light Red | Red | 12 |
| Bright Green | \`e[92m | \`e[102m | Light Green | Green | 10 |
| Bright Yellow | \`e[93m | \`e[103m | Light Yellow | Yellow | 14 |
| Bright Blue | \`e[94m | \`e[104m | Light Blue | Blue | 09 |
| Bright Magenta | \`e[95m | \`e[105m | Light Purple | Magenta | 13 |
| Bright Cyan | \`e[96m | \`e[106m | Light Aqua | Cyan | 11 |
| Bright White | \`e[97m | \`e[107m | Bright White | White | 15 |
| ANSI/VT Color | ANSI/VT FG Code | ANSI/VT BG Code | cmd.exe* | PowerShell** | ColorTable | ConHost semantics |
|----------------|-----------------|-----------------|--------------|---------------|------------|-------------------|
| Black | \`e[30m | \`e[40m | Black | Black | 00 | Screen Background |
| Red | \`e[31m | \`e[41m | Red | DarkRed | 04 | |
| Green | \`e[32m | \`e[42m | Green | DarkGreen | 02 | |
| Yellow | \`e[33m | \`e[43m | Yellow | DarkYellow | 06 | |
| Blue | \`e[34m | \`e[44m | Blue | DarkBlue | 01 | |
| Magenta | \`e[35m | \`e[45m | Purple | DarkMagenta | 05 | Popup Text |
| Cyan | \`e[36m | \`e[46m | Aqua | DarkCyan | 03 | |
| White | \`e[37m | \`e[47m | White | Gray | 07 | Screen Text |
| Bright Black | \`e[90m | \`e[100m | Gray | DarkGray | 08 | |
| Bright Red | \`e[91m | \`e[101m | Light Red | Red | 12 | |
| Bright Green | \`e[92m | \`e[102m | Light Green | Green | 10 | |
| Bright Yellow | \`e[93m | \`e[103m | Light Yellow | Yellow | 14 | |
| Bright Blue | \`e[94m | \`e[104m | Light Blue | Blue | 09 | |
| Bright Magenta | \`e[95m | \`e[105m | Light Purple | Magenta | 13 | |
| Bright Cyan | \`e[96m | \`e[106m | Light Aqua | Cyan | 11 | |
| Bright White | \`e[97m | \`e[107m | Bright White | White | 15 | Popup Background |

_* you can type `color /?` in cmd.exe to view the naming definition._
_** you can type `[Enum]::GetValues([System.ConsoleColor])` to enumerate the color names in powershell._
Expand Down

0 comments on commit ce479e0

Please sign in to comment.