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

Add support for converting arbitrary BBCode colors to truecolor ANSI escape codes in print_rich() #87899

Open
Swarkin opened this issue Feb 3, 2024 · 3 comments · May be fixed by #98118
Open

Comments

@Swarkin
Copy link
Contributor

Swarkin commented Feb 3, 2024

Tested versions

Present in all 4.x docs,
haven't checked 3.x.

System information

N/A

Issue description

The docs explicitly say only these colors are supported in print_rich:
Godot_v4 3-dev2_win64_PzIxbWjGiJ
even though all others also seem to be working fine.

Steps to reproduce

print_rich('[color=tomato]tomato color![/color]') - Works fine

Minimal reproduction project (MRP)

N/A

@bruvzg
Copy link
Member

bruvzg commented Feb 3, 2024

Docs are correct, color=tomato will only show in the editor log (since it's RichTextLabel and support all colors, and other RTL features like img), but won't show in the OS terminal.

@Calinou
Copy link
Member

Calinou commented Feb 3, 2024

I was working on implementing arbitrary color code conversion to truecolor ANSI escape codes, but I couldn't get it to work yet.

@Calinou Calinou changed the title Bad print_rich docs Add support for converting arbitrary BBCode colors to truecolor ANSI escape codes Feb 3, 2024
@Calinou Calinou changed the title Add support for converting arbitrary BBCode colors to truecolor ANSI escape codes Add support for converting arbitrary BBCode colors to truecolor ANSI escape codes in print_rich() Feb 3, 2024
@Swarkin
Copy link
Contributor Author

Swarkin commented Feb 3, 2024

Docs are correct, color=tomato will only show in the editor log (since it's RichTextLabel and support all colors, and other RTL features like img), but won't show in the OS terminal.

Oh okay I wasn't aware that this was related to the terminal! The fact about bbcode to ansi conversion is only mentioned a bunch of lines below so I thought that it applied to the Godot output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants