Rendering of colors introduces small artifact during rendering to the console #607

Closed
opened 2026-01-30 21:56:44 +00:00 by claunia · 16 comments
Owner

Originally created by @musm on GitHub (Apr 1, 2019).

Originally assigned to: @miniksa on GitHub.

On Linux the color boxes shown below don't have the artifact of the very thin black lines separating each color box from each other.

CMD.exe
image

compare to running the equivalent code in bash.
image

Originally created by @musm on GitHub (Apr 1, 2019). Originally assigned to: @miniksa on GitHub. On Linux the color boxes shown below don't have the artifact of the very thin black lines separating each color box from each other. CMD.exe ![image](https://user-images.githubusercontent.com/4319522/55361456-32323900-54a5-11e9-94a6-78ccc1bcb1cc.png) compare to running the equivalent code in bash. ![image](https://user-images.githubusercontent.com/4319522/55362953-8d662a80-54a9-11e9-955c-3ae9563431a8.png)
claunia added the Product-ConhostArea-RenderingIssue-BugNeeds-Tag-Fix labels 2026-01-30 21:56:44 +00:00
Author
Owner

@miniksa commented on GitHub (Apr 2, 2019):

Both of those screenshots are of the console host window? Just the top one is CMD.exe and the bottom one is Bash via WSL to some distro? And they're both the same font?

If yes to all of the above, I am very, very curious. Can you help me understand how I can set this up locally to reproduce it? I'm not familiar with Julia. And is Crayons a default library of Julia? (i.e. if I go search for Julia and download it for Windows and run it, can I simply type what you did and reproduce it here? Same goes for if I install an ubuntu WSL and apt-get or otherwise install Julia?)

@miniksa commented on GitHub (Apr 2, 2019): Both of those screenshots are of the console host window? Just the top one is CMD.exe and the bottom one is Bash via WSL to some distro? And they're both the same font? If yes to all of the above, I am very, very curious. Can you help me understand how I can set this up locally to reproduce it? I'm not familiar with Julia. And is Crayons a default library of Julia? (i.e. if I go search for Julia and download it for Windows and run it, can I simply type what you did and reproduce it here? Same goes for if I install an ubuntu WSL and apt-get or otherwise install Julia?)
Author
Owner

@musm commented on GitHub (Apr 2, 2019):

Sorry I should've provided a lot more clarification.
The top one uses my modified julia build to try and support VT Term sequences (link to windows installer https://www.dropbox.com/s/w4zr2tkldz15f12/julia-a62b8ec9c6-win64.exe?dl=0)
after installing julia open it up in a cmd.exe window and run
julia --color=yes -E "using Pkg; Pkg.add(\"Crayons\"); using Crayons; Crayons.test_256_colors(false)"

The bottom picture is from WSL, you can just use https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz
and run the exact same command

image

LEFT IS CMD RIGHT IS WSL in mintty

@musm commented on GitHub (Apr 2, 2019): Sorry I should've provided a lot more clarification. The top one uses my modified julia build to try and support VT Term sequences (link to windows installer https://www.dropbox.com/s/w4zr2tkldz15f12/julia-a62b8ec9c6-win64.exe?dl=0) after installing julia open it up in a cmd.exe window and run `julia --color=yes -E "using Pkg; Pkg.add(\"Crayons\"); using Crayons; Crayons.test_256_colors(false)"` The bottom picture is from WSL, you can just use https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz and run the exact same command ![image](https://user-images.githubusercontent.com/4319522/55372514-ff516a80-54cf-11e9-9e4b-4515c63b7f9d.png) LEFT IS CMD RIGHT IS WSL in mintty
Author
Owner

@musm commented on GitHub (Apr 2, 2019):

Side by side comparison of other images where these artifacts are more obvious

image
LEFT IS CMD RIGHT IS WSL in mintty

@musm commented on GitHub (Apr 2, 2019): Side by side comparison of other images where these artifacts are more obvious ![image](https://user-images.githubusercontent.com/4319522/55372765-df6e7680-54d0-11e9-9d09-2a84d4bddba0.png) LEFT IS CMD RIGHT IS WSL in mintty
Author
Owner

@musm commented on GitHub (Apr 2, 2019):

So it seems that this is an issue due to conhost, because all the images I have shown above that render properly are from mintty. On the other hand using Julia from WSL and rendering with conhost from bash OR using cmd and my patched julia version. Leads to the rendering artifacts as shown in the LEFT hand side of the graphics provided.

@musm commented on GitHub (Apr 2, 2019): So it seems that this is an issue due to conhost, because all the images I have shown above **that render properly are from mintty**. On the other hand using Julia from WSL and rendering with conhost from bash OR using cmd and my patched julia version. Leads to the rendering artifacts as shown in the LEFT hand side of the graphics provided.
Author
Owner

@musm commented on GitHub (Apr 2, 2019):

Interesting. Even though I'm using the same font in the comparisons. I have noted that if I use Deja Vu Sans Mono the effects are lessened in conhost.

@musm commented on GitHub (Apr 2, 2019): Interesting. Even though I'm using the same font in the comparisons. I have noted that if I use Deja Vu Sans Mono the effects are lessened in conhost.
Author
Owner

@miniksa commented on GitHub (Apr 2, 2019):

OK, less interesting then. It's probably just the way that conhost decides to render things puts gaps between the cells somehow.

I was very interested if two different clients both hosted in conhost appeared differently.

Any chance you can tee the output from the colors command to a file for me?

@miniksa commented on GitHub (Apr 2, 2019): OK, less interesting then. It's probably just the way that conhost decides to render things puts gaps between the cells somehow. I was very interested if two different clients both hosted in conhost appeared differently. Any chance you can tee the output from the colors command to a file for me?
Author
Owner

@musm commented on GitHub (Apr 3, 2019):

256.txt
24bit.txt

I've attached a test file above, let me know if this is what you were looking for.

One is for the 24bit block and the other 256

@musm commented on GitHub (Apr 3, 2019): [256.txt](https://github.com/Microsoft/console/files/3039903/256.txt) [24bit.txt](https://github.com/Microsoft/console/files/3039904/24bit.txt) I've attached a test file above, let me know if this is what you were looking for. One is for the 24bit block and the other 256
Author
Owner

@miniksa commented on GitHub (Apr 5, 2019):

That's good but I am specifically looking for which Unicode codepoint is being used to print the block character. It looks like you have those files printing the number of every color instead of the square block that your picture above uses.

Do you know specifically which codepoint that block is?

@miniksa commented on GitHub (Apr 5, 2019): That's good but I am specifically looking for which Unicode codepoint is being used to print the block character. It looks like you have those files printing the number of every color instead of the square block that your picture above uses. Do you know specifically which codepoint that block is?
Author
Owner

@musm commented on GitHub (Apr 5, 2019):

I think it's

https://unicode-table.com/en/2588/

@musm commented on GitHub (Apr 5, 2019): I think it's ` █ ` https://unicode-table.com/en/2588/
Author
Owner

@miniksa commented on GitHub (Apr 5, 2019):

Ugh. U+2588 is an ambiguous width block per http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt which means it can vary per font.

Which font were you using and what size?

@miniksa commented on GitHub (Apr 5, 2019): Ugh. U+2588 is an ambiguous width block per http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt which means it can vary per font. Which font were you using and what size?
Author
Owner

@musm commented on GitHub (Apr 5, 2019):

Ahh I see. I was using consolas font for both comparisons, which is a bit confusing then as to why they render differently.

@musm commented on GitHub (Apr 5, 2019): Ahh I see. I was using consolas font for both comparisons, which is a bit confusing then as to why they render differently.
Author
Owner

@miniksa commented on GitHub (Apr 5, 2019):

Well, the console host window even with Consolas does some stuff to force characters into a certain cell grid. That might be getting in the way. I'm going to look into it.

@miniksa commented on GitHub (Apr 5, 2019): Well, the console host window even with Consolas does some stuff to force characters into a certain cell grid. That might be getting in the way. I'm going to look into it.
Author
Owner

@musm commented on GitHub (Apr 5, 2019):

That makes more sense then. Ok great, good luck.

@musm commented on GitHub (Apr 5, 2019): That makes more sense then. Ok great, good luck.
Author
Owner

@musm commented on GitHub (Jul 23, 2020):

Looks like this is fixed because I don't see it anymore !

@musm commented on GitHub (Jul 23, 2020): Looks like this is fixed because I don't see it anymore !
Author
Owner

@DHowett commented on GitHub (Jul 23, 2020):

Wow, great find! We missed closing this one when we did #5743

@DHowett commented on GitHub (Jul 23, 2020): Wow, great find! We missed closing this one when we did #5743
Author
Owner

@DHowett commented on GitHub (Jul 23, 2020):

Thanks for following up

@DHowett commented on GitHub (Jul 23, 2020): Thanks for following up
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#607