{/* Generated by packages/docs/script/generate-theme-tokens.ts. Do not edit. */} ```json title="my-theme.json" { "version": 2, "light": { "hue": { "accent": "$hue.purple", "interactive": "$hue.purple" }, "text": { "default": "$hue.neutral.900" }, "background": { "default": "#fafafa" } }, "dark": { "mergeMode": true, "text": { "default": "$hue.neutral.100" }, "background": { "default": "#101014" } } } ``` ## Token reference This reference is generated from the Effect schema in `packages/tui/src/theme/v2/schema.ts`. Changes to the runtime schema update this section through `bun run generate`. ### Hue tokens Every hue is a 9-step scale. Define a scale with all of these steps, or alias it to another hue with a value such as `$hue.blue`. | | Values | | ----- | -------------------------------------------------------------------------------------------------------- | | Hues | `gray`, `red`, `orange`, `yellow`, `green`, `cyan`, `blue`, `purple`, `accent`, `interactive`, `neutral` | | Steps | `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` | Reference a hue color as `$hue..`, for example `$hue.interactive.500`. ### Semantic tokens Semantic values can reference another token by prefixing its path with `$`, for example `$text.default`. Stateful tokens inherit their `default` value when a state is omitted. | Group | Tokens | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | `text.default`
`text.subdued` | | `text.action` | `text.action.primary.default`
`text.action.primary.$hovered`
`text.action.primary.$focused`
`text.action.primary.$pressed`
`text.action.primary.$selected`
`text.action.primary.$disabled`
`text.action.destructive.default`
`text.action.destructive.$hovered`
`text.action.destructive.$focused`
`text.action.destructive.$pressed`
`text.action.destructive.$selected`
`text.action.destructive.$disabled` | | `text.formfield` | `text.formfield.default`
`text.formfield.$hovered`
`text.formfield.$focused`
`text.formfield.$pressed`
`text.formfield.$selected`
`text.formfield.$disabled` | | `text.feedback` | `text.feedback.error.default`
`text.feedback.error.subdued`
`text.feedback.warning.default`
`text.feedback.warning.subdued`
`text.feedback.success.default`
`text.feedback.success.subdued`
`text.feedback.info.default`
`text.feedback.info.subdued` | | `background` | `background.default` | | `background.surface` | `background.surface.offset`
`background.surface.overlay` | | `background.action` | `background.action.primary.default`
`background.action.primary.$hovered`
`background.action.primary.$focused`
`background.action.primary.$pressed`
`background.action.primary.$selected`
`background.action.primary.$disabled`
`background.action.destructive.default`
`background.action.destructive.$hovered`
`background.action.destructive.$focused`
`background.action.destructive.$pressed`
`background.action.destructive.$selected`
`background.action.destructive.$disabled` | | `background.formfield` | `background.formfield.default`
`background.formfield.$hovered`
`background.formfield.$focused`
`background.formfield.$pressed`
`background.formfield.$selected`
`background.formfield.$disabled` | | `background.feedback` | `background.feedback.error.default`
`background.feedback.warning.default`
`background.feedback.success.default`
`background.feedback.info.default` | | `border` | `border.default` | | `scrollbar` | `scrollbar.default` | | `diff.text` | `diff.text.added`
`diff.text.removed`
`diff.text.context`
`diff.text.hunkHeader` | | `diff.background` | `diff.background.added`
`diff.background.removed`
`diff.background.context` | | `diff.highlight` | `diff.highlight.added`
`diff.highlight.removed` | | `diff.lineNumber` | `diff.lineNumber.text`
`diff.lineNumber.background.added`
`diff.lineNumber.background.removed` | | `syntax` | `syntax.comment`
`syntax.keyword`
`syntax.function`
`syntax.variable`
`syntax.string`
`syntax.number`
`syntax.type`
`syntax.operator`
`syntax.punctuation` | | `markdown` | `markdown.text`
`markdown.heading`
`markdown.link`
`markdown.linkText`
`markdown.code`
`markdown.blockQuote`
`markdown.emphasis`
`markdown.strong`
`markdown.horizontalRule`
`markdown.listItem`
`markdown.listEnumeration`
`markdown.image`
`markdown.imageText`
`markdown.codeBlock` | ### Contexts `@context:elevated` and `@context:overlay` accept partial overrides of the semantic tokens above. Components apply these contexts to surfaces that need different contrast without changing the base theme.