-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add support for setting colors using "Operation System Command" sequence. #1493
Copy link
Copy link
Closed
Labels
help wantedtype/enhancementFeatures or improvements to existing featuresFeatures or improvements to existing features
Description
In traditional terminals which support 256 color, (Gnome terminal, xterm, iTerm and etc.) colors can be set using Operation System Command sequence. In example: printf "\033]4;18;rgb:ff/00/00\033\\". Where \033 escape character and 4 means color set command, followed by color number 18 and color in RGB with closing `\033\' escape sequence. However, terminals which built using xterm.js (VC's internal terminal or Hyper terminal) dose not reflect system color change commands.
Details
- Browser and browser version: I tested it under VSCode IDE and Hyper.is terminal which uses internal xterm.js
- OS version: Ubuntu 16.04 LTS
- xterm.js version: Depends on VSCode IDE and Hyper.is
Steps to reproduce
- Input following
printf "\033]4;18;rgb:ff/00/00\033\\"in Gnome terminal and Hyper or VC's terminal for comparison. - And then input following
printf "\033[38;5;18mWhat color is it?\033[0m\n". It shows "What color is it?" in RED color on the gnome terminal however on Hyper terminal it shows blue (Images attached). Changes by previous command was not reflected to xterm.js.
So, it would be nice if it will be added to xterm.js since there is many color themes which require custom colors.
Gnome output:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedtype/enhancementFeatures or improvements to existing featuresFeatures or improvements to existing features
