{# A legend and its swatches, as macros: components/legend.html (the Python Legend) and any template that explains its colours. {% from "components/_legend.html" import legend, swatch %} {{ legend([{"label": "Free", "color": "var(--fcu-surface-alt)"}, {"label": "Off", "pattern": "hatch"}, {"label": "Over", "outline": "solid", "edge": "danger"}], label=t("legend")) }}