The theme tables in @logic2b/tokens are the single source for web and native
design tokens. One /create preset id resolves to the same semantic light and
dark roles on every platform.
Published default artifacts
The default theme is generated with exact-pinned Style Dictionary 5.5.2 and served as static, integrity-addressed build artifacts:
| Artifact | Path |
|---|---|
| Manifest + SHA-256 integrity | /tokens/default/manifest.json |
| Portable DTCG-shaped source | /tokens/default/logic2b.tokens.json |
| Tokens Studio / Figma Variables | /tokens/default/logic2b.tokens-studio.json |
| CSS custom properties | /tokens/default/logic2b.css |
| Android light resources | /tokens/default/android/values/logic2b_tokens.xml |
| Android dark resources | /tokens/default/android/values-night/logic2b_tokens.xml |
| iOS light tokens | /tokens/default/ios/Logic2bLightTokens.swift |
| iOS dark tokens | /tokens/default/ios/Logic2bDarkTokens.swift |
CSS preserves the source OKLCH colors. Native outputs use deterministic,
gamut-clamped sRGB conversions: Android gets values and values-night
resources, while iOS gets explicit light and dark UIColor classes. Radius is
converted from 0.625rem to 10 platform points. Font stacks remain in the
portable JSON and CSS because registering a native font is application-specific.
Figma Variables through Tokens Studio
Use logic2b.tokens-studio.json as a single-file storage source in the
Tokens Studio for Figma plugin.
The artifact follows the plugin’s
W3C DTCG format and
contains global, light and dark token sets. Its two theme records share a
Logic2b group, so the plugin can map them to one Figma Variable collection
with Light and Dark modes.
For GitHub sync, point the plugin at repository amariner/logic2b-ui, branch
main, and file
apps/web/public/tokens/default/logic2b.tokens-studio.json, then pull the token
sets and themes. The public file can also be downloaded from the table above
for a local import. Use the generic logic2b.tokens.json artifact instead when
the consumer does not need Tokens Studio metadata.
Export any preset through MCP
Call export_tokens with a preset id from /create, or with the same explicit
options accepted by apply_preset:
{
"preset": "<preset-id>"
}
The result includes the portable bundle and the matching Tokens Studio
contract. Both use global for radius and typography, plus light and dark
for semantic colors. Feed the generic bundle into Style Dictionary or another
DTCG-compatible pipeline; use tokensStudio for a custom Figma preset.
Regenerate from the repository
Contributors can emit the default artifacts or a custom preset to another directory:
pnpm --filter @logic2b/tokens build
pnpm --filter @logic2b/tokens build -- --preset <preset-id> --out-dir ./build/tokens
The build is deterministic and CI verifies every generated file against the SHA-256 manifest and against the current shared token tables.