amenui
en·中 github ↗ v0.0.1
01docs 02components 03lab 04works
en·中github ↗
×

docs / guides / theming and dark mode docs / guides /

Theming and dark mode

02.2
On this page ▾
  1. What a theme holds
  2. Restraint

A theme is a set of colours and the faces for display, body and monospace (style::THEMES). Paints are names, not colours: Paint::INK, TEXT, DIM, FAINT, GROUND, ACCENT and the hues Paint::hue(i), so the same view is right in every theme. Dark and light are two themes of the same view: switch with the top bar's Theme menu, Msg::Theme, the render tool's theme, or <amenui-view theme="dark">.

What a theme holds

FieldMeaning
ground, ink, accentThe page's ground, the strongest ink, the one accent.
huesThe secondary colours for planes and charts.
display, body, monoThe faces for each role (text::SANS, PIXEL, MONO, GEIST_PIXEL).
sizesThe type scale: display, title, body, small.

Restraint

One accent per page. Dark themes do best with a near-black ground and a single saturated accent; the readout and the Body scene show the style.