Metadata is returned from blks_metadata() as a data.frame with
each row corresponding to a block. Both blk_color() and
blk_icon_data_uri() return character vectors.
Arguments
blocks
Blocks passed as blocks or block object
category
Block category
icon_svg
Character string containing the SVG icon markup
color
Hex color code for the background
size
Numeric size in pixels (default: 48)
mode
Switch between URI and inline HTML mode
Details
blks_metadata(): Retrieves metadata given a block or blocks object
from the block registry. Can also handle blocks which are not
registered and provides default values in that case.
blk_color(): Produces colors using the Okabe-Ito colorblind-friendly
palette for a character vector of block categories.
blk_icon_data_uri(): Processes block icons to add color and turn them
into square-shaped icons.