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

Support setting extended ansi colors (16-255) #3601

Closed
Tyriar opened this issue Jan 10, 2022 · 3 comments · Fixed by #3905
Closed

Support setting extended ansi colors (16-255) #3601

Tyriar opened this issue Jan 10, 2022 · 3 comments · Fixed by #3905
Labels
area/api help wanted type/enhancement Features or improvements to existing features
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 10, 2022

API proposal: ITheme.extendedAnsi: number[], which would encode colors from index 16 (but not necessarily all of them).

VS Code ask: microsoft/vscode#140235

@goenning
Copy link

goenning commented Oct 5, 2022

@Tyriar @silamon How do I use these colors? If I have extendedAnsi: [ '#dcdcdc' ], what should the space code be?

I thought it would: \x1b[1;255mHello World\x1b[0m but it didn't work. Thanks

@Tyriar
Copy link
Member Author

Tyriar commented Oct 5, 2022

@goenning for 256 color you want:

\x1b[38;5;<index>m

So replacing index with 17 I think is what you want there?

@goenning
Copy link

goenning commented Oct 6, 2022

That was it, thank you 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api help wanted type/enhancement Features or improvements to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants