yep something with VS Code.
Aha! VScode console maybe does not seems to support RGB colors (truecolor). Try this one please:
julia> println("\e[38;5;226;48;5;4mThis must have blue background\e[0m")
This is unexpected Try this please:
julia> println("\e[38;5;226mTest 1\e[0m")
julia> println("\e[48;5;4mTest 2\e[0m")
julia> println("\e[48;5;4m\e[38;5;226mTest 3\e[0m")
julia> println("\e[38;5;226m\e[48;5;4mTest 4\e[0m")
a glimpse of light at the end of the tunnel!
from console in Win10:
In Pluto dumps to the console corectly.
Very strange! it seems that VSCode is not understanding that composition of ANSI escape sequences. Notice that: \e[38;5;226m\e[48;5;4m
and \e[38;5;226;48;5;4m
must do the same thing.
Can you please do one more verification:
julia> println("\e[38;2;255;255;0m\e[48;2;0;0;255mThis must have blue background\e[0m")
So, it is definitely a problem in VSCode console not understanding that composition.
Actions?
Do we/I/u report it to them?
I didn’t try in Chrome.JuPyter notebook. Did u?
I think it is better to check for an open issue. However, it seems something related with your configuration. What OS are you using? Here (macOS) it is working fine:
Hum, maybe trying to reinstall VSCode and removing all plugins and configurations?
Oh dear, not again! I better do a ritual sepuku!
However, it is clear it is something related to either a bug in VScode or some local configuration or plugin.
The package Crayons.jl always create the composed escape sequence. Notice that if I compose two different crayons, I get only one escape sequence:
julia> Crayon(;foreground = 0xFFFF00) * Crayon(; background = 0x0000FF)
\e[38;2;255;255;0;48;2;0;0;255m
I am not sure if there is an easy workaround for this.
By the way, VSCode is usually black, are you using a theme? If so, can you try reverting to the default one?
Hum… well, I have no more ideas then