Spaces:
Running on Zero
Running on Zero
| """Osaka Jade β the single source of SCRYPT's colour. | |
| The exact palette from the Omarchy / OpenCode "Osaka Jade" theme: a deep | |
| jade-black terminal, soft sage foreground, coral red, gold, and a bright | |
| mint cyan that does most of the talking. Both the terminal game (Textual | |
| theme + Rich styles) and the HuggingFace Space (CSS variables) read these | |
| constants, so the two surfaces are the same machine wearing one face. | |
| """ | |
| from __future__ import annotations | |
| # ------------------------------------------------------------- raw palette | |
| BG = "#111c18" # background: deep jade-black | |
| BG_DEEP = "#0b130f" # a notch darker, for wells and insets | |
| SURFACE = "#15241e" # panels sit just above the background | |
| PANEL = "#1b2b24" # status bars, prompts | |
| FG = "#c1c497" # foreground: soft sage | |
| FG_DIM = "#8a9a86" # muted foreground | |
| BLACK = "#23372b" # normal black (borders, grid lines) | |
| BRIGHT_BLACK = "#53685b" # dim text, disabled | |
| RED = "#ff5345" # coral β damage, danger, the reaper | |
| RED_DIM = "#db9f9c" # soft coral | |
| GREEN = "#549e6a" # jade β your side, growth | |
| YELLOW = "#459451" # the muted gold-green | |
| GOLD = "#e5c736" # bright yellow β sigils, highlights, cycles | |
| BLUE = "#509475" # teal-blue | |
| MAGENTA = "#d2689c" # pink β rarer accents | |
| PINK = "#75bbb3" # bright magenta (really a soft teal) | |
| CYAN = "#2dd5b7" # the signature bright mint β the Warden's voice | |
| CYAN_SOFT = "#8cd3cb" # softer mint | |
| WHITE = "#f6f5dd" # near-white cream | |
| JADE_GLOW = "#9eebb3" # bright green β escape, victory, the totem | |
| CURSOR = "#d7c995" # warm cursor | |
| # --------------------------------------------------- semantic Rich styles | |
| # Named roles used across the renderers, so a colour decision lives in one | |
| # place. Rich accepts these hex strings directly. | |
| WARDEN = CYAN # the Warden speaks in mint | |
| PLAYER = GREEN # the player's processes are jade | |
| DANGER = RED # incoming damage, the kill threshold | |
| TREASURE = GOLD # cycles, sigils, things worth wanting | |
| BORDER = BLACK # default card / panel border | |
| BORDER_BRIGHT = BRIGHT_BLACK | |
| MUTED = FG_DIM | |
| GHOST = BRIGHT_BLACK # empty lanes, spent things | |
| def textual_theme(): | |
| """The Osaka Jade theme, registered with the Textual app. Drives every | |
| $-variable in the screen CSS (backgrounds, panels, accents, borders).""" | |
| from textual.theme import Theme | |
| return Theme( | |
| name="osaka-jade", | |
| primary=CYAN, | |
| secondary=GREEN, | |
| accent=GOLD, | |
| foreground=FG, | |
| background=BG, | |
| surface=SURFACE, | |
| panel=PANEL, | |
| success=JADE_GLOW, | |
| warning=GOLD, | |
| error=RED, | |
| dark=True, | |
| variables={ | |
| "block-cursor-foreground": BG, | |
| "block-cursor-background": CYAN, | |
| "border": BLACK, | |
| "scrollbar": PANEL, | |
| "scrollbar-hover": GREEN, | |
| "text-muted": FG_DIM, | |
| "footer-background": PANEL, | |
| "footer-key-foreground": CYAN, | |
| "input-cursor-background": CURSOR, | |
| "input-selection-background": f"{GREEN} 35%", | |
| }, | |
| ) | |
| THEME_NAME = "osaka-jade" | |