SourceEnum HexColor
from egui import HexColorclass HexColor:A wrapper around Color32 that converts to and from a hex-color string
Implements Display and FromStr to convert to and from the hex string.
Methods§
@staticmethod
def Hex3(color: Color32) -> HexColor§
@staticmethod
def Hex4(color: Color32) -> HexColor§
@staticmethod
def Hex6(color: Color32) -> HexColor§
@staticmethod
def Hex8(color: Color32) -> HexColor§
Sourcedef color(self, /) -> Color32§
Retrieves the inner Color32
@staticmethod
def from_str(hex: str) -> HexColor§
Source@staticmethod
def from_str_without_hash(hex: str) -> HexColor§
Parses a string as a hex color without the leading # character
Errors
Returns an error if the length of the string does not correspond to one of the standard formats (3, 4, 6, or 8), or if it contains non-hex characters.