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.
Token families
| Group | Roles |
|---|---|
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.wallpaper | Wallpaper-aware surface treatment |
icon.gradient | System 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
| Field | Values | Meaning |
|---|---|---|
modes | ["light"], ["dark"], both | Appearance modes the theme supports |
base | iris, ground | Native chrome or the flat foundation |
shellLayout | desktop, dock, launcher | Shell presentation |
launcherLayout | grid, springboard | Launcher arrangement |
windowChrome | standard, compact | Window 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.
| Kind | Fields | Use |
|---|---|---|
range | min, max, step, optional unit, decimals | Numeric values such as radius, blur or opacity |
color | optional presets[], seed | A colour token; seed recomputes derived roles |
choice | options[] | A small set of named values, such as material or layout |
"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
{
"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
- Create a theme — the authoring flow.
- Package & install — theme.json, ZIP, trust and validation.
- Shell & UI — how the shell applies a theme.
- RUI design documentation
Was this page helpful?