"""Colours and thresholds shared by the LCD and the case/RAM lighting.""" from __future__ import annotations from dataclasses import dataclass @dataclass class Theme: accent: tuple[int, int, int] = (232, 28, 44) cpu_temp_range: tuple[float, float] = (20.0, 100.0) gpu_temp_range: tuple[float, float] = (20.0, 90.0) psu_watts: float = 1000.0 # fills the power tank # Optional mirrored direction on the right; by default all gauges fill clockwise. mirror_gauge_direction: bool = False titles: tuple[str, str] = ("GPU", "CPU") # Gauges are green below *_warn, yellow from *_warn to *_hot, red above. temp_warn: float = 50.0 # deg C temp_hot: float = 80.0 load_warn: float = 50.0 # percent load_hot: float = 80.0 cool_color: tuple[int, int, int] = (38, 204, 72) warm_color: tuple[int, int, int] = (244, 192, 22) hot_color: tuple[int, int, int] = (232, 28, 44) # Power tank layers. Kept clear of the gauges' green/yellow/red, and checked to stay # distinguishable with colour-blindness against the dark glass. cpu_color: tuple[int, int, int] = (57, 135, 229) # blue gpu_color: tuple[int, int, int] = (25, 158, 112) # aqua other_color: tuple[int, int, int] = (217, 89, 38) # copper orange def level_color(self, value: float, warn: float, hot: float) -> tuple[int, int, int]: if value < warn: return self.cool_color if value <= hot: return self.warm_color return self.hot_color