How to use the modulate value in an if statement

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

How can I do something when the modulate value is for example “ffffff”
I thought it will look like this:

if modulate == "ffffff":
     print("Hello")
:bust_in_silhouette: Reply From: Magso

You’re comparing a Color to a String, here’s what it should be.

if modulate == Color("ffffff"):
    print("Hello")