- The-Kurgan-Sword.png is the source. kurgan/assets/make_assets.py cleans it
(drops the white fringe left by the cut-out, smooths the edge to about a
pixel) and builds everything from it:
- kurgan/assets/kurgan.ico: the tray icon, 16-256 px, cropped to the
crossguard; sizes of 32 px and under are brightened a little so the
metal still reads on a dark taskbar.
- web/static/favicon.ico: the same crop, 16-48 px.
- web/static/logo.png: the header logo, the whole sword with the cut-off
blade faded out.
- web/static/sword-vertical.png: the whole sword turned 90 degrees
clockwise.
- tray.py: ICON_PATH replaces the drawn power-tank icon (make_icon is gone).
app.py already imports ICON_PATH; it went in with f717f7a.
- style.css: the vertical sword is a fixed backdrop below the header, lined
up with the right edge of the tiles; the cards are 90% opaque so it shows
through. 90% keeps the grey text at 4.5:1 contrast or better over the
sword in both themes; 80% dropped it to 3.4:1.
- favicon.svg removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.5 KiB
Python
37 lines
1.5 KiB
Python
"""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
|