How can I animate a Label's text color?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Arron Washington
:warning: Old Version Published before Godot 3 was released.

I prototyped out an arcadey-style effect of flashing text (1980s “white-red-blue-white” cycle) using CanvasModulate + AnimationPlayer on a Label node, which worked great until I discovered that CanvasModulate affects everything on the scene, not just the node it’s attached to.

Instead I decided to just change the text color directly for every label, except that whenever I open up the AnimationPlayer panel, I the option to select a custom color for the label disappears.

How can I animate a color change for a node?

EDIT: apparently a bug: Cannot assign a custom color to a label after assigning it a theme · Issue #7001 · godotengine/godot · GitHub

whenever I open up the AnimationPlayer panel, I the option to select a custom color for the label disappears

Never seen this. Just tested and I can use the Font Color property of the Label in the AnimationPlayer just fine.

vnen | 2016-10-31 12:53

:bust_in_silhouette: Reply From: avencherus

You most certainly should with Custom Colors > Font Color.

I’m not having any issues with it.

Video

Thanks for the sanity check. I think I’ve hit a bug – or at least a very strange behavior – in Godot. Cannot assign a custom color to a label after assigning it a theme · Issue #7001 · godotengine/godot · GitHub – for anyone else Googling, the “custom color” field disappears after you assign a label a theme, even though that field still works in the animator if animate it beforehand…

Arron Washington | 2016-10-31 19:32

Oh my, yeah that is a tricky. I wonder if it’s like that because of the dynamic fonts.

avencherus | 2016-11-01 03:55