0 votes

I looked at the documentation but

$Container/RichTextLabel.add_text("[color=#ffffff]Example text[/color]")

just comments out everything after the #. Doing

$Container/RichTextLabel.add_text("Example text")

works perfectly in the default text color. But I want to be able to change the color of each line that I show in the label.

in Engine by (39 points)

1 Answer

+1 vote

You could use the push_color function before the add_text. I hope that helps!

by (31 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.