Next: (hygguile components container), Previous: (hygguile components code), Up: API
Create a clickable colour tile that steps through the shades of a palette colour.
The tile carries bg-<color> and shows that colour’s name; the
script it calls replaces the class with the next variant of the same
colour every time it is clicked – 100, 300, 500, 700, 900 and back to
100 – and relabels the tile to match, so the tile always names the
shade it is showing.
The palette colour to show, named the way a class names it:
apple-green-500.
The text on the tile, or #f for the colour’s own name.
The accessible name of the tile, or #f for a sentence naming the
colour and what a click does.
List of CSS classes for the tile itself.
List of CSS classes for the frosted caption inside it.
(color-swatch #:color 'apple-green-500)