class documentation

class Color:

Constructor: Color(r, g, b, a)

View In Hierarchy

A Color object models an RGB with Alpha Transparency color.

Method __init__ Construct self such that it has the given red (r), green (g), blue (b), and alpha (a) components. alpha (a) defaults to 255 which is non-transparent solid color.
Method __str__ Return the string equivalent of self, that is, a string of the form '(r, g, b)'.
Method get_alpha Return the alpha transparency component of self.
Method get_blue Return the blue component of self.
Method get_green Return the green component of self.
Method get_red Return the red component of self.
Instance Variable _a Undocumented
Instance Variable _b Undocumented
Instance Variable _g Undocumented
Instance Variable _r Undocumented
def __init__(self, r: int = 0, g: int = 0, b: int = 0, a: int = 255):

Construct self such that it has the given red (r), green (g), blue (b), and alpha (a) components. alpha (a) defaults to 255 which is non-transparent solid color.

def __str__(self):

Return the string equivalent of self, that is, a string of the form '(r, g, b)'.

def get_alpha(self) -> int:

Return the alpha transparency component of self.

def get_blue(self) -> int:

Return the blue component of self.

def get_green(self) -> int:

Return the green component of self.

def get_red(self) -> int:

Return the red component of self.

_a =

Undocumented

_b =

Undocumented

_g =

Undocumented

_r =

Undocumented