-
-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yellow and Magenta do not display in powershell #2
Comments
ANSI codes aren't supported on windows, node intercepts them and calls the relevant windows API (where one exists). Powershell has a deep blue background colour by default and I suppose some Microsoft dev decided that since on windows you can only set the background to 16 different colours using the existing API they would have to redefine one of those colours as the deep blue. Quite why they didn't just implement an API that allows the entire spectrum like every other terminal, or even better: support ANSI codes, I don't know. I can't wait to get a new MacBook Pro, as much as I love Windows it is a complete pain to develop on. |
Oh, Windows...
Believe you me it's a complete pain for tool creators too...
Do they just not show or is the color escape shown? This is more of a Node core issue and I encourage you to open a ticket there if there isn't already a ticket for it. I'm surprised this haven't come up before seeing as Node is a couple of years old. |
They just don't show (node removes the color escape)
I opened an issue on the relevant part of node (joyent/libuv#881) but this issue isn't just with node - trying to do the same thing with python will produce the same results so I think it's just one of those windows things and the best way to combat it is to use the bold magenta for large portions of text (it is ok for really small things as it sets the background to black so it is just about readable (example taken from |
I'm not sure what should be done about this, if anything.
Yellow isn't too much of a problem since it displays as white but
magenta
actually displays as the same colour as the powershell background which isn't exactly ideal.The two options, as far as I can see, are:
chalk
messy which is something I think you are very keen to avoid)'\x1b[35m'
to'\x1b[95m'
In addition to those colours
italic
,underline
,inverse
andstrikethrough
do not work on windows so I think something in the readme should note that.The text was updated successfully, but these errors were encountered: