Themes · contract

Theme tokens and parameters.

A theme is a set of semantic values, not a pile of component overrides. These are the token families, modes and parameter kinds the shell understands.

9 min readUpdated 25 November 2026RUI · token contract

Token families

GroupRoles
color.*accent, accent.strong, on.accent, canvas.background, panel.background, surface, text.primary, text.muted, outline, shadow
material.*blur, saturation, opacity, morphism
shape.*window, dock, icon and control radii
motion.*duration and easing roles
typography.*family, display and type scale
layout.*Layout primitives for shell and app surfaces
texture.wallpaperWallpaper-aware surface treatment
icon.gradientSystem icon artwork

Write semantic roles, not component selectors. If a component needs a value the contract does not have, add a role to the theme contract instead of reaching into component CSS.

Modes, bases and variants

FieldValuesMeaning
modes["light"], ["dark"], bothAppearance modes the theme supports
baseiris, groundNative chrome or the flat foundation
shellLayoutdesktop, dock, launcherShell presentation
launcherLayoutgrid, springboardLauncher arrangement
windowChromestandard, compactWindow title and controls

iris inherits the native rumahl chrome and is the right base for most themes. ground is a square, flat, shadow-less foundation for a theme that owns its presentation. It is a base, not a complete theme.

The shell resolves the active mode and variant selection. A theme declares what it supports; it does not force a mode onto the user.

Parameter kinds

A parameter points at one token and asks the shell to render a control. The shell clamps ranges, validates choices and resolves labels per locale.

KindFieldsUse
rangemin, max, step, optional unit, decimalsNumeric values such as radius, blur or opacity
coloroptional presets[], seedA colour token; seed recomputes derived roles
choiceoptions[]A small set of named values, such as material or layout
theme.json parameters
"parameters": [
  {
    "kind": "range",
    "id": "corner",
    "token": "shape.radius.window",
    "min": 0,
    "max": 24,
    "step": 1,
    "unit": "px",
    "label": { "en": "Window corners", "de": "Fensterecken" }
  },
  {
    "kind": "color",
    "id": "accent",
    "token": "color.accent",
    "seed": true,
    "label": { "en": "Accent" }
  },
  {
    "kind": "choice",
    "id": "material",
    "token": "material.blur",
    "options": [
      { "value": "6px", "label": { "en": "Calm" } },
      { "value": "36px", "label": { "en": "Deep glass" } }
    ],
    "label": { "en": "Glass depth" }
  }
]

A complete token set

theme tokens
{
  "id": "com.example.ocean",
  "name": "Ocean",
  "modes": ["light", "dark"],
  "base": "iris",
  "tokens": {
    "color.accent": "#0b6ea8",
    "color.accent.strong": "#3b9ad1",
    "color.on.accent": "#ffffff",
    "color.canvas.background": "#071a24",
    "color.panel.background": "#0d2733",
    "color.text.primary": "#eaf4f9",
    "color.text.muted": "#9ab4c2",
    "color.outline": "#ffffff24",
    "shape.radius.window": "16px",
    "material.opacity": "0.72",
    "material.blur": "18px",
    "typography.display": "\"Fraunces Variable\", Georgia, serif"
  }
}

Omitted tokens fall back to the base, so a theme is always complete. That fallback is a floor, not a reason to omit the roles that define the theme.

Quality rules

  • Body and control text keep readable contrast in every supported mode.
  • Focus rings are visible on every surface.
  • Reduced motion removes decorative motion without hiding content.
  • Long labels and German strings do not clip controls.
  • The theme does not depend on a particular wallpaper.
  • Every parameter writes only its declared token.

Next