How to use the ColorN?

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

Hello.
I’m new in here.

Color ColorN ( String name, float alpha )

I don’t know how to use that member function…
Anyone know how to use this?

:bust_in_silhouette: Reply From: Michael Paul

Means color number. It’s basically a lookup table to simplify getting the RGBA for common colors.

# Primary Colors

var red = ColorN('red')
print (red) # prints 1,0,0,1
var blue = ColorN('blue')
print (blue) # prints 0,0,1,1

#Color blend

var purple= ColorN('purple')
print (purple) # prints 0.63,0.13,0.94,1

Thank you!!!

GooDGooN | 2017-12-10 12:31