Skip to content

color

FreeBodyEngine.graphics.color #

Color(value) #

An RGB(A) color, normalized internally to float_normalized_a (four floats in 0-1) regardless of how it was constructed - accepts a hex string, a 0-255 int tuple/list, or an already-normalized float tuple/ list, and exposes all of those representations back out via its properties.

Parses value (a #RRGGBB(AA) hex string, a 3/4-length int tuple/list in 0-255, or a 3/4-length float tuple/list already in 0-1) into float_normalized_a.

float_normalized property #

(R, G, B), values are stored in floats between 0-1

float_normalized_a = tuple(value) + (1.0,) instance-attribute #

hex property writable #

RRGGBB#

hexa property #

RRGGBBAA#

rgb property writable #

(R, G, B)

rgba property #

(R, G, B, A)