Missing support for bold extended colours in console #337

Closed
opened 2026-01-30 21:49:21 +00:00 by claunia · 4 comments
Owner

Originally created by @9Rune5 on GitHub (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)

Originally created by @9Rune5 on GitHub (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)
claunia added the Product-ConhostResolution-Fix-Committed labels 2026-01-30 21:49:22 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 1, 2018):

  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.

@DHowett-MSFT commented on GitHub (Aug 1, 2018): 1. This set of LS_COLORS is _amazing_. It looks like it mostly works with [this PowerShell DirColors module](https://www.powershellgallery.com/packages/DirColors/1.1.1), as well. 2. On 17723, I'm seeing `bold` match `plain` in color: ![image](https://user-images.githubusercontent.com/14316954/43495238-b68f3f24-94eb-11e8-9f47-3a81c0dddfac.png) While the color's there, the bolding definitely isn't.
Author
Owner

@zadjii-msft commented on GitHub (Aug 1, 2018):

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 commented on GitHub (Aug 1, 2018): 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
Author
Owner

@9Rune5 commented on GitHub (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...).

@9Rune5 commented on GitHub (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...).
Author
Owner

@jwise commented on GitHub (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!

@jwise commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#337