How to change color of text in a RichTextLabel?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LockManipulator

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.

:bust_in_silhouette: Reply From: brane

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