ipygame.color
Color Objects
Section titled “Color Objects”class Color()__init__
Section titled “__init__”def __init__(*args)@propertydef r() -> int@r.setterdef r(value: int) -> None@propertydef g() -> int@g.setterdef g(value: int) -> None@propertydef b() -> int@b.setterdef b(value: int) -> None@propertydef a() -> int@a.setterdef a(value: int) -> None@propertydef cmy() -> tuple[float, float, float]CMY representation (0.0 – 1.0 each).
@cmy.setterdef cmy(value: tuple[float, float, float]) -> Nonefrom_cmy
Section titled “from_cmy”@classmethoddef from_cmy(cls, c: float, m: float, y: float) -> Self@propertydef hsva() -> tuple[float, float, float, float](hue 0-360, sat 0-100, value 0-100, alpha 0-100).
@hsva.setterdef hsva(value: tuple[float, float, float, float]) -> Nonefrom_hsva
Section titled “from_hsva”@classmethoddef from_hsva(cls, h: float, s: float, v: float, a: float = 100.0) -> Self@propertydef hsla() -> tuple[float, float, float, float](hue 0-360, sat 0-100, lightness 0-100, alpha 0-100).
@hsla.setterdef hsla(value: tuple[float, float, float, float]) -> Nonefrom_hsla
Section titled “from_hsla”@classmethoddef from_hsla(cls, h: float, s: float, l: float, a: float = 100.0) -> Selfi1i2i3
Section titled “i1i2i3”@propertydef i1i2i3() -> tuple[float, float, float]from_i1i2i3
Section titled “from_i1i2i3”@classmethoddef from_i1i2i3(cls, i1: float, i2: float, i3: float) -> Selfnormalized
Section titled “normalized”@propertydef normalized() -> tuple[float, float, float, float]normalized
Section titled “normalized”@normalized.setterdef normalized(value: tuple[float, float, float, float]) -> Nonefrom_normalized
Section titled “from_normalized”@classmethoddef from_normalized(cls, r: float, g: float, b: float, a: float = 1.0) -> Self@propertydef hex() -> strfrom_hex
Section titled “from_hex”@classmethoddef from_hex(cls, h: str) -> Selfnormalize
Section titled “normalize”def normalize() -> tuple[float, float, float, float]correct_gamma
Section titled “correct_gamma”def correct_gamma(gamma: float) -> Colordef lerp(other: Color | tuple, t: float) -> Colorgrayscale
Section titled “grayscale”def grayscale() -> Colorpremul_alpha
Section titled “premul_alpha”def premul_alpha() -> Colorupdate
Section titled “update”def update(*args) -> None