docs(tools): note that ansi_art heroes must opt out of the gradient

This commit is contained in:
beefcarver committed 2026-11-14 09:35:10 -05:00
1 parent 06ae18a17d
commit 456f6afa44
1 file changed
+13 -2
+13 -2
View File
@@ -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/<slug>/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