From e97a2b32911f113de72c4be1f76454bb0077ebb6 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 29 Apr 2026 16:23:34 +0000 Subject: [PATCH] Improved color compatibility across terminals that may have very different ideas of yellow shades. --- paskia/fastapi/logging.py | 4 ++-- paskia/util/startupbox.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/paskia/fastapi/logging.py b/paskia/fastapi/logging.py index e243488..c99872b 100644 --- a/paskia/fastapi/logging.py +++ b/paskia/fastapi/logging.py @@ -26,8 +26,8 @@ _METHOD_WRITE = "\033[1;94m" # POST, PUT, DELETE, PATCH (bold bright blue) _HOST = "\033[38;5;242m" # hostname (dark grey) _PATH = "\033[38;5;250m" # path (white) _TIMING = "\033[38;5;242m" # timing/devmode (dark grey) -_WS_OPEN = "\033[1;93m" # WebSocket connect (bold bright yellow) -_WS_CLOSE = "\033[33m" # WebSocket disconnect (yellow) +_WS_OPEN = "\033[38;5;226m" # WebSocket connect (brightest yellow from 6x6x6 cube) +_WS_CLOSE = "\033[38;5;142m" # WebSocket disconnect (significantly dimmer yellow) _WS_STATUS = "\033[38;5;242m" # WebSocket close status (dark grey) _AUTHZ_DENIED = "\033[0;31m" # Permission denied (red) _AUTHZ_USER = "\033[1;34m" # User info (light blue) diff --git a/paskia/util/startupbox.py b/paskia/util/startupbox.py index 9d652f9..b1f4136 100644 --- a/paskia/util/startupbox.py +++ b/paskia/util/startupbox.py @@ -19,8 +19,8 @@ BOX_WIDTH = 60 # Inner width (excluding box chars) # ANSI color codes RESET = "\033[0m" -YELLOW = "\033[33m" # Dark yellow -BRIGHT_YELLOW = "\033[93m" # Bright yellow +YELLOW = "\033[38;5;184m" # Bright yellow (6x6x6 cube, r=4 g=4) +BRIGHT_YELLOW = "\033[38;5;226m" # Brightest yellow (6x6x6 cube) BRIGHT_WHITE = "\033[1;37m" # Bold bright white @@ -50,8 +50,8 @@ def bottom() -> str: def print_startup_config(runtime: RuntimeConfig) -> None: """Print server configuration on startup.""" # Key graphic with yellow shading (bright for highlights, dark for body) - y = YELLOW # Dark yellow for main body - b = BRIGHT_YELLOW # Bright yellow for highlights/edges + y = YELLOW # Bright golden yellow for main body + b = BRIGHT_YELLOW # Brightest yellow for highlights/edges w = BRIGHT_WHITE # Bold white for URL r = RESET