-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Actions] Support 256 colors #24777
Comments
I think it can be done by finding a new JS term color library to replace "ansi-to-html". The action view page just calls a 3rd library to render the term outputs (or just write one by ourselves) |
I cursorly checked how GitHub does it, but it seems they didn't open-source the terminal rendering parts and it's mentioned that the code was mostly inherited from Azure pipelines. The only other terminal rendering library I could find is https://github.com/drudru/ansi_up, it's worth a try to see if it fares any better. I assume it's likely that we will need to incorporate and modify one of these libs. |
I did use ansi_up in woodpecker and it works quite good |
Feature Description
Results from a color test script:
It looks like Gitea Actions only supports 16 color, no 256, but apparently true color backgrounds. Also there seems to be a bug where some 256-color escape sequences are interpreted as enabling underline style.
The implementation should detect the relevant ANSI escape sequences and use inline styles for at least the 256 and 16m variants, e.g.
style="color:rgb(0,204,153)"
. We should also use some "nicer" colors for the 16-color variants that have sufficient contrast over the background.Screenshots
GitHub
Gitea
The text was updated successfully, but these errors were encountered: