From 0b1eb1684771736c7030f00cbdfe34f81ee63ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Fri, 31 Oct 2025 18:10:45 +0300 Subject: [PATCH] =?UTF-8?q?hex=20=D0=BA=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- get_data.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/get_data.py b/get_data.py index 5da5ad6..3cb9b4b 100644 --- a/get_data.py +++ b/get_data.py @@ -560,18 +560,18 @@ async def game(): @app.get("/status.json") async def status(request: Request): def color_for_status(status_value: str) -> str: - """Подбор текстового цвета для статуса""" + """Подбор цвета статуса в HEX""" status_value = str(status_value).lower() if status_value in ["ok", "success", "live", "live_soon", "online"]: - return "green" + return "#00FF00" # зелёный elif status_value in ["scheduled", "today_not_started", "upcoming"]: - return "yellow" + return "#FFFF00" # жёлтый elif status_value in ["result", "resultconfirmed", "finished", "finished_today"]: - return "red" + return "#FF0000" # красный elif status_value in ["no_game_today", "unknown", "none"]: - return "white" + return "#FFFFFF" # белый else: - return "gray" + return "#808080" # серый (неизвестный статус) data = { "league": LEAGUE,