pkg:clod/com.clodhub/theme 0.11.0 Design tokens (colours, spacing, radii, type scale, animated background style) as one JSON shape rendered to CSS variables, Swift constants and Kotlin constants, plus the animated background. `theme` holds the look of an application as data: colours, spacing, corner radii, a type scale and the style of an animated background (glyphs drifting out of the dark under a glow, with specks, a scene picture behind and figures in front). One `themes.json` renders to CSS variables for the web, Swift constants for Apple and Kotlin constants for Android, so the three clients cannot drift apart. Colours are `#rrggbb` or `#rrggbbaa`. Examples A recipe picks `lounge` for a home-games look and sets `primaryColour` to its brand colour; every client shows the same colours. A recipe with no scene pictures still gets the animated glyphs and specks. A new look is added by appending a theme to `themes.json` and regenerating. Package URL: pkg:clod/com.clodhub/theme@0.11.0 Class: Theme (pkg:clod/com.clodhub/theme-class@1.1.0): Colours, spacing, type and an animated background for every client. Any component of this class can fill a recipe slot that asks for it. Category presentation/design-tokens; https://clodhub.com/classes/theme-class.txt; 1 other component of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Ftheme-class Provides (1) - theme (com.clodhub/theme 1.0.0): Design tokens for colours, spacing, radii, type scale and an animated background, rendered to CSS variables, Swift constants and Kotlin constants. Web: implementation/web/tokens.ts and background.ts. Apple: ThemeTypes.swift, ThemeTokens.swift, BackgroundMath.swift, ThemeBackgroundView.swift. Android: package com.clodhub.theme. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Ftheme Requires (0) - none Settings (3) `themeName` selects a theme from `themes.json` (shipped: `night`, a dark room with a warm glow rising from below; `lounge`, a slower, softer look with the glow from above). An unknown name falls back to the default. `primaryColour` and `tableColour` are optional colours that replace the theme's primary (buttons, headings, highlights) and table (playing surface) colours; empty means the theme's own. A clod string setting cannot hold `#` and must start with a letter, so a colour is written `hex e0b35a` (six digits, or eight with opacity); code may also pass `#e0b35a`. The settings are strings with the `label` grammar; a malformed colour is refused. Scene pictures and figures are supplied by the application at run time, not by this package. - themeName: string (slug); optional, default "night" - primaryColour: string (label); optional, no default - tableColour: string (label); optional, no default Depends on components: none How to use in a recipe A recipe uses it through a slot of class Theme (pkg:clod/com.clodhub/theme-class 1.1.0), naming pkg:clod/com.clodhub/theme as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (theme) to the slots that use it. The recipe sets themeName, primaryColour and tableColour; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"theme","class":{"name":"pkg:clod/com.clodhub/theme-class","version":"1.1.0","digest":"7c232af36715ae9385ef88b01b7fdf9aba15e222eb6421f38b0ba34db4403745"},"preferred":{"name":"pkg:clod/com.clodhub/theme","version":"0.11.0"}} - in place of another component of the class: clod fetch theme@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=theme@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot theme) For developers: how an application uses it Web: import `resolveTheme` and `applyTheme` from `web/tokens.ts`, apply the result to `document.documentElement`, link `web/theme.css` for the shipped themes (`:root` is the default theme, `[data-theme=name]` the others), and construct `Background` from `web/background.ts` on a full-screen canvas with `setScene` for pictures. Apple: compile `ThemeTypes.swift`, `ThemeTokens.swift`, `BackgroundMath.swift` anywhere, and `ThemeBackgroundView.swift` in UIKit targets (iOS, tvOS, Mac Catalyst); read colours as `ThemeSet.named(name).resolved(primary:table:)` and `Color(themeColour)`. Android: add the three Kotlin files and `ThemeBackground.kt` to a Compose module; `ThemeSet.named(name).resolved(...)`. To change a look, edit `themes.json` and run `node web/build-tokens.ts themes.json --css DIR --swift DIR --kotlin DIR` to regenerate the three outputs; `tokens.schema.json` documents the shape and `validateTokens` enforces it. Other components (`controls`, `table-layout`, `card-graphics`, `chip-graphics`) read colours from these tokens. Accounts and services None. Pure data, local rendering and on-device drawing. No accounts, network or deployment. How it is checked Node tests check the token shape against the schema, that the OpenRPC interface's token schemas agree with `tokens.schema.json` and that every method it lists is an exported web function, overrides, CSS variable rendering, that the committed generated CSS, Swift and Kotlin equal what the renderers produce, and the background placement maths (visibility, fade, growth, figure boxes). The Apple check compiles the pure Swift files for macOS and runs `tests/apple/main.swift`, which compares every generated colour with `themes.json` and every glyph and speck frame with frames the TypeScript produced (`tests/fixtures/background.json`), then type-checks all Swift against the iOS simulator SDK. The Android check compiles the pure Kotlin files and runs `tests/android/Main.kt`; it needs kotlinc, which was not available where this was written, so it has not been run. Compose drawing (`ThemeBackground.kt`) is not compiled by any check here. No pixel output is compared. - `node --test tests/web.test.ts` (web, required-local; tools: node 26.5) - `python3 tests/native.py apple` (apple, platform; tools: python3 3.12, swiftc 6.4, xcrun 72) - `python3 tests/native.py android` (android, platform; tools: python3 3.12, kotlinc 2.2, java 26.0) Updates Patch updates replace files only. Regenerate the CSS, Swift and Kotlin outputs after any change to `themes.json`. The component keeps no data; removal deletes its files and the generated outputs. Tags: design-tokens, presentation, theme Targets: client android, ios, macos, tvos, web, windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/theme release v0.11.0; digest sha256:48d79256f537ff831a74b59ff0508bf9daae44bcc0fefa791f5f0d9d36374a5c Release: features Line 0.11: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/theme/0.11.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Images (4): https://clodhub.com/images/ff9b6a60a2548608e598ea54b8a2a06e7beb55c5ba9180d2a44bad00473f9194.png (web, The night look: colours, actions and table over its animated background); https://clodhub.com/images/ccc3aebd5f7003e80bd8951655e380f04cb5ca14e8314df1f0e685cf065fe58f.png (web, The night look's animated background on its own); https://clodhub.com/images/868075a8e03df8fa34cf58746b5d06e7de024ab7f21eeb374cb6759e98263e0f.png (web, The lounge look: colours, actions and table over its animated background); https://clodhub.com/images/91fda1e77f877006888a2231f6a72312661d79bbdc1f370a9aba3f562d5c1e96.png (web, The lounge look's animated background on its own) Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/theme/0.11.0 Bundle download: GET https://clodhub.com/api/components/theme/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/theme-class@1.1.0 7c232af36715ae9385ef88b01b7fdf9aba15e222eb6421f38b0ba34db4403745 com.clodhub/theme 1.0.0 entry modules: android android/src/main/java, ios apple/Sources, macos apple/Sources, server server/index.ts, tvos apple/Sources, web web/index.ts, windows web/index.ts shared behaviour suites: apple-values, shared Platforms: android, ios, macos, server, tvos, web, windows Toolchains: android >=8.0.0, ios >=17.0.0, java >=17.0.0 <27.0.0, kotlin =2.4.21, macos >=14.0.0, node >=26.5.0 <27.0.0, swift =6.4.2, tvos >=17.0.0 Frameworks: android-ui: androidx.compose.ui =1.10.0 Styles: scope global; 64 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 2 exact dependencies, 48 files (listed on the details page) Suitable for jobs: theme profile any: cost none; load none; regions any; compliance none Notes: Pure library; no provider limits apply. Data migration: this component keeps no data Maintainers: Level N Ltd; https://github.com/clodhub/theme/issues; updates https://github.com/clodhub/theme/releases (manual) What you download theme-0.11.0.tar, from release v0.11.0 of clodhub/theme: 48 files - Documents and manifests (8): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (17): android/ (4), apple/ (4), server/ (1), web/ (8) - Tests (6): android/ (1), apple/ (1), fixtures/ (1), make-fixtures.ts, native.py, web.test.ts - Interface documents (1): theme.json - Class files: the class's interfaces and shared checks (5): theme-class/ (5) - Examples (2): consumer.ts, images.ts - Images of it as built (4): lounge-background.png, lounge-sample.png, night-background.png, night-sample.png - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 17 of them into the application under components/theme/: android 4, apple 4, server 1, web 8 Not included: the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.11.0 features (2026-11-26T11:33:31.544Z) sha256:48d79256f537ff831a74b59ff0508bf9daae44bcc0fefa791f5f0d9d36374a5c Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/theme/details.txt?version=0.11.0 Page: https://clodhub.com/components/theme; JSON: https://clodhub.com/api/components/theme/0.11.0; connections diagram: https://clodhub.com/api/components/theme/0.11.0/connections.svg Copyright Level N Ltd 2026