default shortcut on Windows remaps ANSI colors 35,36
See original GitHub issueThis should probably go to the Windows group, but Github is a better platform. Ref: https://github.com/nodejs/node/issues/14243
Steps to reproduce
node
> process.stdout.write(`\u001b[35mXXX\u001b[39m`)
Expected behavior
megenta output

Actual behavior
dark blue output (same as background)

Environment data
The default powershell .lnk remaps colors 35, and 36

Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Use ANSI colors in the terminal - Windows CMD
The actual colors displayed are dependent on the Terminal color scheme which can be set using ColorTool.exe The new default color scheme is...
Read more >ANSI escape code
ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals...
Read more >Custom actions in Windows Terminal
For example, this default setting uses the shortcut key ctrl+shift+1 to open a new tab in the terminal based on whichever profile is...
Read more >Windows console with ANSI colors handling
The registry key at HKEY_CURRENT_USER\Console\VirtualTerminalLevel sets the global default behavior for processing ANSI escape sequences.
Read more >PowerToys Keyboard Manager utility for Windows
Remapping shortcuts · Shortcuts must begin with a modifier key: Ctrl , Shift , Alt , or ⊞ Win · Shortcuts must end...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

As best as I can tell, neither the cmd.exe shortcut nor the PSCore6 shortcut modifies the magenta color so it’s only an issue with Windows PowerShell, correct? As @BrucePay mentioned, for Windows PowerShell, this is by-design and changing it now is a breaking change.
I think the default fg/bg colors should be decoupled from the 16 ANSI colors, and instead be separately be defined. That’s how pretty much all Unix terminals do it.