Skip to content
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

Missing support for bold extended colours in console #229

Closed
9Rune5 opened this issue Jul 31, 2018 · 4 comments
Closed

Missing support for bold extended colours in console #229

9Rune5 opened this issue Jul 31, 2018 · 4 comments
Labels
Product-Conhost For issues in the Console codebase Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@9Rune5
Copy link

9Rune5 commented Jul 31, 2018

[Version 10.0.17692.1004]

In PowerShell:
$esc = [char]0x1b
"${esc}[38;5;208mplain${esc}[0m ${esc}[38;5;208;1mbold${esc}[0m"

"bold" is printed in plain white.

Expected result is bold in orange letters.

(Found this when comparing colours with bash extension hilightning using the https://github.com/trapd00r/LS_COLORS colour scheme)

@DHowett-MSFT
Copy link
Contributor

  1. This set of LS_COLORS is amazing. It looks like it mostly works with this PowerShell DirColors module, as well.
  2. On 17723, I'm seeing bold match plain in color:

image

While the color's there, the bolding definitely isn't.

@zadjii-msft zadjii-msft added Product-Conhost For issues in the Console codebase Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. labels Aug 1, 2018
@zadjii-msft
Copy link
Member

So this comes down to two parts:

  1. RGB color followed by \x1b[1m removes the color and instead prints in white (or some other bright color)
  2. The console doesn't support bold text

I believe 1 is already fixed in Insiders (if not it's on it's way out) - I believe there's another issue that brought that to my attention, but I can't recall off the top of my head.

2 is being tracked by #109

@zadjii-msft zadjii-msft added this to the RS5 milestone Aug 1, 2018
@9Rune5
Copy link
Author

9Rune5 commented Aug 2, 2018

I finally managed to upgrade to build 17728 (had to nuke a user profile), and your analysis is correct.

@DHowett-MSFT Thanks for DirColors! I have been using it for a couple of months now. I intend to submit a PR to trapd00r to include more support for MS-centric file extensions (.ps1 is an obvious one...).

@jwise
Copy link

jwise commented Aug 16, 2018

I've run into a variant of this on build 17134. I'm using Alacritty as a terminal emulator (and it is amazingly fast!), which I think uses WinPTY. The variant of this that I've noted is that it is occasionally possible to get genuinely bold text (if there are no other modifiers -- i.e., echo -e '\033[1m;Bold!'), but if I add both bold and color together (i.e., echo -e '\033[1;32m;Colors!'), then I may get a bright color, but no bold text. I've noted this also in other terminal emulators on the system. This seems like a mysterious result to me, but it's not the same as how Alacritty behaves on Linux, anyway. Is the Windows console layer doing some filtering that I do not understand?

@zadjii-msft, is this also something that you're tracking as "issue 1" in your comment above? Or should I be going spelunking in Alacritty source?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Conhost For issues in the Console codebase Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

4 participants