lib module
color-bar function
#let color-bar(
min: none,
max: none,
label: none,
label-gap: 4pt,
colormap: "viridis",
position: bottom + right,
inset: 8pt,
)Documentation
Construct a scalar color bar using the same named palette as the renderer. label-gap controls the vertical space between its label and palette strip.
Parameters
min(int, float): Scalar value shown at the low end of the palette. Default:none.max(int, float): Scalar value shown at the high end of the palette. Default:none.label(none, content, str): Optional color-bar label. Default:none.label-gap(length): Non-negative vertical gap below the label. Default:4pt.colormap(str): Named scalar palette, either"viridis"or"magma". Default:"viridis".position(any): Typst alignment used to place the color bar. Default:bottom + right.inset(length): Distance from the selected render edge. Default:8pt.
Returns
dictionary
Defined in lib.typ:544.