← Về thư mục
skills/scientific-visualization/scripts/palette_audit.py
- parse_hex_color · function · L33-L42 — def parse_hex_color(value: str) -> tuple[int, int, int]
- canonical_hex · function · L45-L46 — def canonical_hex(rgb: tuple[int, int, int]) -> str
- _linear_channel · function · L49-L51 — def _linear_channel(channel: int) -> float
- relative_luminance · function · L54-L57 — def relative_luminance(rgb: tuple[int, int, int]) -> float
- contrast_ratio · function · L60-L68 — def contrast_ratio( first: tuple[int, int, int], second: tuple[int, int, int] ) -> float
- cie_lstar · function · L71-L79 — def cie_lstar(rgb: tuple[int, int, int]) -> float
- _load_palette_asset · function · L82-L91 — def _load_palette_asset() -> ModuleType
- bundled_palettes · function · L94-L104 — def bundled_palettes() -> dict[str, list[str]]
- audit_palette · function · L107-L215 — def audit_palette( colors: Iterable[str], *, background: str = DEFAULT_BACKGROUND, role: str = "graphical", contrast_threshold: float | None = None, grayscale_min_delta: float = DEFAULT_GRAYSCALE_DELTA, name: str | None = None, ) -> dict[str, Any]
- build_parser · function · L218-L271 — def build_parser() -> argparse.ArgumentParser
- main · function · L274-L323 — def main(argv: list[str] | None = None) -> int