neoscore.core.color

class neoscore.core.color.Color[source]

Bases: object

An 8-bit int RGBA color.

__init__(*args)[source]
Valid signatures:
  • Color(css_hex_string)

  • Color(red, green, blue)

  • Color(red, green, blue, alpha)

classmethod from_def(color_def: ColorDef) Color[source]
property red

The 0-255 value of the red color channel

Type

int

property green

The 0-255 value of the green color channel

Type

int

property blue

The 0-255 value of the blue color channel

Type

int

property alpha

The 0-255 value of the alpha color channel

Type

int

neoscore.core.color.ColorDef

A Color or a shorthand hex string or init argument tuple for one.

Hex strings may have 3 channels (#RRGGBB) or 4 (#RRGGBBAA).

alias of Union[Color, str, Tuple[int, int, int], Tuple[int, int, int, int]]