-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How to set terminal colors? #59
Comments
I believe xterm.js uses an external stylesheet instead of styles embedded into the JavaScript like term.js. Therefore you have to import |
Thanks, that clears that up :) |
Hi @Tyriar, @petschekr got it completely right; xterm.js depends on xterm.css for proper color rendering, in order to allow theming of the terminal. I guess it would be helpful to document this in a more visible place though 😊 . |
This does not allow you to set the background color of the terminal |
I set the background terminal color with term._core.renderer.colorManager.colors.background = {
css: "#fdf6e3",
rgba: "rgb(253, 246, 227)",
} |
@zwhitchcox the current way to do this: const term = new Terminal({
'theme', { background: '#fdf6e3' }
});
// or
term.setOption('theme', { background: '#fdf6e3' }); |
On a related note, are there any known themes out there or NPM packages containing themes? |
@sdegutis not that I'm aware of |
@Tyriar Thanks, I'll just check out the ones VS Code comes with. |
Have you solved it? |
I was looking into using xterm.js for vscode's integrated terminal but the colors seem to be gone after I swapped out jeremyramin/term.js.
Expected:
This is how I was setting the colors:
The text was updated successfully, but these errors were encountered: