From 456f6afa44854d67def9856afc39c6e720397cd2 Mon Sep 17 00:00:00 2001 From: beefcarver Date: Sat, 14 Nov 2026 09:35:10 -0500 Subject: [PATCH] docs(tools): note that ansi_art heroes must opt out of the gradient --- tools/ansi_art.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/ansi_art.py b/tools/ansi_art.py index 4a40a1c..afdeba8 100644 --- a/tools/ansi_art.py +++ b/tools/ansi_art.py @@ -7,11 +7,18 @@ half. Colours are quantised to the stock 16-colour ANSI palette on purpose — the rest of the UI never emits RGB, and a hero built from palette names still reads as the station's art in any terminal theme. +Shipped catalogues no longer use image art: each one renders a wordmark from +beefy_player/providers/wordmark.py, which the header repaints with the active +palette gradient (RadioProvider.hero_gradient, on by default). Art from this +tool carries colours of its own, so a provider that uses it must set +hero_gradient = False — otherwise the header repaints the art with the gradient +and the palette names below are wasted. + Usage: python tools/ansi_art.py logo.png --cols 22 --rows 7 - python tools/ansi_art.py --url https://tilderadio.org/logos/tilderadio.png \\ - --cols 22 --rows 7 --module beefy_player/providers/tilderadio/hero.py + python tools/ansi_art.py --url https://example.org/logo.png \\ + --cols 22 --rows 7 --module beefy_player/providers//hero.py ``--preview out.png`` draws what the cells will look like, which is much easier to judge than a wall of ▀ and ▄. @@ -209,6 +216,10 @@ Regenerate with:: Each row is rich markup; ``▀`` is a half block whose foreground is the top pixel and whose background is the pixel below it. Colours are stock ANSI palette names, so the art keeps the terminal's own palette. + +The header paints every hero with the active palette gradient unless the +provider opts out, so the class using this art must set +``hero_gradient = False``. """ from __future__ import annotations