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

Test: True color in terminal #74467

Closed
2 tasks done
Tyriar opened this issue May 28, 2019 · 2 comments
Closed
2 tasks done

Test: True color in terminal #74467

Tyriar opened this issue May 28, 2019 · 2 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented May 28, 2019

Test for #18544

Complexity: 3

The integrated terminal now supports true color (24-bit) rendering, please verify that the colors are working in both the DOM renderer* and canvas renderer:

"terminal.integrated.rendererType": "dom",
"terminal.integrated.rendererType": "canvas",

Print colors in this mode to the terminal uses the CSI Pm m escape sequence where Pm is:

  • Pm = 3 8 ; 2 ; Pr ; Pg ; Pb -> Set foreground color to RGB Pr/Pg/Pb.
  • Pm = 4 8 ; 2 ; Pr ; Pg ; Pb -> Set background color to RGB Pr/Pg/Pb.

The easiest way to test this is via echo -e:

echo -e '\x1b[38;2;255;0;0mrgb(255, 0, 0) red foreground'
echo -e '\x1b[48;2;0;0;255mrgb(0, 0, 255) blue background'

Experiment with mixing true color with other colors, for example true color foreground and ansi background \x1b[38;2;255;0;0m\x1b[42m. For ANSI color mode use \x1b[3${x}m (fg) and \x1b[4${x}m (bg), for 256 color mode (a fixed palette) use \x1b[38;5;${num}m (fg) and \x1b[48;5;${num}m (bg).

More details/references:

* You may run into this issue in the DOM renderer #74183, it will be fixed in tomorrow's build.

@kieferrm
Copy link
Member

This works as expected in all variations. CPU consumption when scrolling large colored output goes up to 100% in canvas mode and beyond that in dom mode. Dom mode in general is significantly slower.

@kieferrm kieferrm removed their assignment May 29, 2019
@Tyriar
Copy link
Member Author

Tyriar commented May 29, 2019

The slow down is expected for canvas as it only caches the first 16 colors, the webgl renderer caches everything.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants