// ShadCN Registry Format
Every published theme gets a ShadCN-compatible URL you can install with one command.
bunx shadcn@latest add https://themetoken.dev/r/themes/[origin].jsonReplace [origin] with the theme's origin ID.
// The Schema
A theme is a small JSON document with a name and matching light and dark styles. Theme Token validates it, publishes it on-chain, and gives it a ShadCN-compatible install URL.
19 required color values *
Charts (optional)
Sidebar (optional)
Typography & Layout
Use a font-family value here. Link an on-chain font through the theme's assets list.
Shadows (optional)
The Studio writes oklch() color values.
{
"$schema": "https://themetoken.dev/v1/schema.json",
"name": "My Theme",
"author": "Name (https://github.com/username)",
"styles": {
"light": {
"background": "oklch(0.98 0.005 240)",
"foreground": "oklch(0.15 0.01 240)",
"card": "oklch(1 0 0)",
"card-foreground": "oklch(0.15 0.01 240)",
"popover": "oklch(1 0 0)",
"popover-foreground": "oklch(0.15 0.01 240)",
"primary": "oklch(0.55 0.22 255)",
"primary-foreground": "oklch(0.98 0 0)",
"secondary": "oklch(0.95 0.005 240)",
"secondary-foreground": "oklch(0.25 0.01 240)",
"muted": "oklch(0.95 0.005 240)",
"muted-foreground": "oklch(0.5 0.01 240)",
"accent": "oklch(0.95 0.01 255)",
"accent-foreground": "oklch(0.25 0.01 240)",
"destructive": "oklch(0.55 0.22 25)",
"destructive-foreground": "oklch(0.98 0 0)",
"border": "oklch(0.9 0.005 240)",
"input": "oklch(0.9 0.005 240)",
"ring": "oklch(0.55 0.22 255)",
"radius": "0.5rem",
"font-sans": "Inter",
"font-mono": "JetBrains Mono"
},
"dark": {
"background": "oklch(0.12 0.015 240)",
"foreground": "oklch(0.95 0.005 240)",
"card": "oklch(0.16 0.015 240)",
"card-foreground": "oklch(0.95 0.005 240)",
"popover": "oklch(0.16 0.015 240)",
"popover-foreground": "oklch(0.95 0.005 240)",
"primary": "oklch(0.65 0.22 255)",
"primary-foreground": "oklch(0.12 0.015 240)",
"secondary": "oklch(0.2 0.015 240)",
"secondary-foreground": "oklch(0.95 0.005 240)",
"muted": "oklch(0.2 0.015 240)",
"muted-foreground": "oklch(0.65 0.01 240)",
"accent": "oklch(0.25 0.02 255)",
"accent-foreground": "oklch(0.95 0.005 240)",
"destructive": "oklch(0.6 0.22 25)",
"destructive-foreground": "oklch(0.98 0 0)",
"border": "oklch(0.25 0.015 240)",
"input": "oklch(0.25 0.015 240)",
"ring": "oklch(0.65 0.22 255)",
"radius": "0.5rem",
"font-sans": "Inter",
"font-mono": "JetBrains Mono"
}
},
"assets": [
{
"role": "font.mono",
"kind": "font",
"source": {
"kind": "origin",
"origin": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_0"
},
"mediaType": "font/woff2",
"integrity": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
}
]
}Install a published theme from /r/themes/[origin].json with the ShadCN CLI.
// On-Chain Metadata
MAP uses registry:theme for theme packages. The gateway returns a ShadCN registry:theme item. Raw assets use the 1Sat registry:asset extension, with kind and mediaType describing their contents.
{
"app": "theme-token",
"type": "registry:theme",
"name": "Cyberpunk Neon",
"version": "1.0.0",
"description": "A bright cyberpunk theme"
}// BSV Implementation
Theme Token uses BSV and 1Sat Ordinals for publishing, discovery, ownership, and registry delivery.
import { fetchThemeByOrigin, applyTheme } from "@theme-token/sdk";
const published = await fetchThemeByOrigin("<txid>_1");
if (!published) throw new Error("Theme not found");
applyTheme(published.theme.styles.light);// TypeScript SDK
Validate, fetch, convert, and apply Theme Tokens from TypeScript.
bun add @theme-token/sdkValidate a Theme Token document
Fetch a published theme by origin
Convert CSS to ThemeToken
Apply one light or dark style map
// For AI Assistants
Copy a concise Theme Token reference into your coding assistant, or give it one of these URLs.
AI tools can also fetch directly: themetoken.dev/llms.txt or themetoken.dev/llms-full.txt