Repository navigation
Theming and Material 3
Materialized Linux implements Material 3 from spec, not from a web widget or simulated values. The pipeline runs from a wallpaper all the way to live application chrome.
Location: libs/libm3.
- CAM16/HCT color conversion.
- Tonal palettes and dynamic schemes, including the Expressive variant.
- Wallpaper quantization and seed selection.
- Contrast-aware color roles.
Verified against Google's material-color-utilities (vendored under third_party/src/material-color-utilities). Decision record: D-010 in Design Decisions.
design/tokens/materialized.tokens.json is compiled by tools/token-compiler.py into QML, CSS and C++ artifacts with accessibility checks. Covered by 13 Python unit tests:
python3 -m unittest tests.unit.token_compiler_test -vLocation: libs/libm3-qt. Provides the M3Theme singleton and Material controls (M3Button, M3Switch, M3Label, ...).
Material 3 Expressive features, covered by the m3theme unit test:
- Spring-physics motion tokens:
M3Theme.spring()with under-damped spatial springs and critically damped effects springs. - Press shape morphing on buttons and switches.
-
Emphasized typography with variable font weight (
M3Theme.fontEmphasized(),M3Label.emphasized). - The Expressive color variant, selectable in Settings, Appearance, Color style.
Typography uses Inter as the M3 typeface (Google Sans is unavailable for redistribution, decision D-014); icons are a custom Material-symbol-consistent set with symbolic fallback (D-015).
Location: shell/matsessiond.
- Decodes a wallpaper with Qt.
- Quantizes it with
libm3and extracts a seed. - Generates light and dark dynamic schemes.
- Atomically writes scheme artifacts: JSON, QML, GTK CSS, xrdb, and a Firefox
userChrome.css. - Exposes theme controls over D-Bus (
org.materialized.Theme1), includingSetVariantfor the Expressive color style.
Changing the wallpaper or the color style in Settings regenerates the scheme and propagates it live to the shell, apps and the browser chrome.
Firefox ESR is launched through /usr/bin/matbrowser, which applies the generated Material 3 userChrome.css from the live wallpaper scheme and uses a dedicated profile under ~/.local/share/materialized/firefox-profile. The browser is packaged, not forked (decision D-020).
bash build/test-theme.shThis decodes the real wallpaper design/wallpaper/materialized-dawn.png, generates light/dark schemes, loads them in the QML gallery and captures a screenshot in build/screenshots/.
ctest --test-dir build/qml --output-on-failure # M3 Expressive theme tokensSee also: Architecture, Testing, docs/ARCHITECTURE.md.