question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

default shortcut on Windows remaps ANSI colors 35,36

See original GitHub issue

This 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 image

Actual behavior

dark blue output (same as background) image

Environment data

The default powershell .lnk remaps colors 35, and 36

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
SteveL-MSFTcommented, Jul 20, 2017

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.

3reactions
silverwindcommented, Jul 20, 2017

Since the background color they chose wasn’t part of the standard palette, one of the less used standard colors was remapped to produce what the designers wanted.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found