S or /

SourceClass Hsva

from egui import Hsva
class Hsva:

Hue, saturation, value, alpha. All in the range [0, 1]. No premultiplied alpha.

Properties§

@property def a(self, /) -> float§
@a.setter def a(self, /, a: float) -> None§
@property def h(self, /) -> float§
@h.setter def h(self, /, h: float) -> None§
@property def s(self, /) -> float§
@s.setter def s(self, /, s: float) -> None§
@property def v(self, /) -> float§
@v.setter def v(self, /, v: float) -> None§

Methods§

Source@staticmethod def from_additive_rgb(r: float, g: float, b: float) -> Hsva§
Source@staticmethod def from_additive_srgb(r: int, g: int, b: int) -> Hsva§
Source@staticmethod def from_rgb(r: float, g: float, b: float) -> Hsva§
Source@staticmethod def from_rgba_premultiplied(r: float, g: float, b: float, a: float) -> Hsva§

From linear RGBA with premultiplied alpha

Source@staticmethod def from_rgba_unmultiplied(r: float, g: float, b: float, a: float) -> Hsva§

From linear RGBA without premultiplied alpha

Source@staticmethod def from_srgb(r: int, g: int, b: int) -> Hsva§
Source@staticmethod def from_srgba_premultiplied(r: int, g: int, b: int, a: int) -> Hsva§

From sRGBA with premultiplied alpha

Source@staticmethod def from_srgba_unmultiplied(r: int, g: int, b: int, a: int) -> Hsva§

From sRGBA without premultiplied alpha

Sourcedef to_opaque(self, /) -> Hsva§
Sourcedef to_rgb(self, /) -> tuple[float, float, float]§
Sourcedef to_rgba_premultiplied(self, /) -> tuple[float, float, float, float]§
Sourcedef to_rgba_unmultiplied(self, /) -> tuple[float, float, float, float]§

To linear space rgba in 0-1 range.

Represents additive colors using a negative alpha.

Sourcedef to_srgb(self, /) -> tuple[int, int, int]§
Sourcedef to_srgba_premultiplied(self, /) -> tuple[int, int, int, int]§
Sourcedef to_srgba_unmultiplied(self, /) -> tuple[int, int, int, int]§

To gamma-space 0-255.