Expand description
Diagram colors for the documentation pages. Per element kind, a light
and a dark fill come from [theme] (LikeC4’s default blue for a kind
with none), and each fill’s text, secondary text and outline are
derived from it. theme.css sets them as --c4-<kind>-* variables for
the system’s light and dark schemes and for a visitor’s explicit
choice (data-theme on the root), then applies them to the nodes of an
inlined view. Group boxes, edges and edge labels take their colors
from the page tokens (--bg, --fg, --muted), so a host stylesheet
that restates those restyles the diagrams with the page.
Pure: colors in, CSS out.
Structs§
- Node
Colors - A node’s colors for one scheme, each
#rrggbb.
Constants§
- LIKE
C4_ DEFAULT_ FILL - The fill
likec4 gen dotgives an element kind with no style.
Functions§
- node_
colors - A fill’s colors: near-black text on a light fill and near-white on a
dark or saturated one (the threshold keeps white text on LikeC4’s blue
and on a rust red), secondary text most of the way from the fill to the
text, and a hairline outline a step from the fill toward the text. A
fill that is not
#rrggbbis LikeC4’s default blue. - stylesheet
theme.cssfor the element kinds a model has, colored from[theme].