Incorrect color rendering on terminal with npm

Hi all, I'm using the dark theme of WebStorm, and whenever I use npm in the terminal I get some characters with the wrong background.

I think it has to do with some environment variables or the terminal type (it's ok on iTerm), but I'm actually clueless here, I don't even know what to search on google. Has anybody the same issue here?


Comment actions Permalink

WebStorm settings that control terminal colors are Preferences | Editor | Colors & Fonts | Console Colors; but they are merged with OS shell preferences (they are mostly used for background coloring) - see and linked tickets. So I'd suggest playing with your shell configuration

Comment actions Permalink


I thought something was messed up too, but it turns out NPM sets the output of the tree to ANSI black background and ANSI yellow foreground. If you check the Darcula colorscheme the output matches what NPM uses. 

To make things look better, go to Editor > Colors & Fonts > Console Colors and Change ANSI Colors > Black to 2B2B2B

This is the same color as the background. So if something does use ANSI black to output text you won't be able to see it. If you run into this situation a lot, you may want to use something else in the color palette like 3C3F41 for ANSI black.

Comment actions Permalink

Suuuper helpful, Russell Shurts. Thanks!


Only commenting on this dead thread because, in the latest version, I ended up actually changing the Gray setting. I have Black set to Foreground=>#FFFFFF, and Gray set to #212121. Figured I'd save someone else the headache lol.


Also, if you're using some other random theme or something, I got #212121 from Console Colors > Console > Background. Use that color.


Please sign in to leave a comment.