Osy#betaRun it on Osyrin: osyrin.com

Reference / Local

Mapping your theme onto your kits — osy kit tokens --app

osy kit tokens --app [group…] [--json]

Prints the design tokens your app comes to once its kits are in it: every token the app or a kit reads, its final light and dark value, whether it comes from your theme, a kit's own default or the floor, and which kits read it — with the one line that ties a colour of yours nothing reads to the floor colour the kits paint with.

previewlocalcliuitheming

Summary#

Your app's look is decided in three places: your own theme, the tokens a kit ships of its own, and the floor (Osysharp.Ui) every kit paints with. osy kit tokens --app, run in your app's folder, prints what each token comes to — light and dark, after every reference is followed — where that value is from, and who reads it. It needs no platform and no database.

Signature#

osy kit tokens --app [group…] [--json]

Description#

Each row is one token the app or a kit reads, or one the app or a kit declares:

  • from — app (your theme declares it, and it wins everywhere), kit <Name> (a kit's own default), or floor (Osysharp.Ui's). An arrow names the token a value refers to (app → Colors.Brand), and (over …) names the defaults yours stands in for.
  • light / dark — the final value in each mode. A reference is followed to what it comes to, so a kit token tied to Colors.Border shows your border if your theme set one.
  • read by — the kits, and app, whose code paints with it — through Colors.X, through its CSS variable, or as the pair Colors.On(ground, …) answers (OnBlush for a Blush ground). "read by nobody" is a token no code paints with.
  • a kit's own colour — under a kit token whose default is a value of its own rather than a floor token, the words its author wrote beside it ([[ui-theming#kit-tokens]]), or "NO REASON GIVEN".

A LOOK's theme paints only while the site wears that look, so it is listed after the rows, with what it sets — and with the colours the kits paint with that it does NOT set, which under that look are still the floor's (a light look that leaves Elevated and Sunken at the floor gets the floor's dark menus and wells in dark mode). app.Look names the look the site wears until staff choose another.

An app palette that never reaches the kits. When a colour of yours that nothing reads sits beside a floor colour the kits still paint with at its default — Accent beside the floor's teal Primary — the report ends with the line that ties them, and osy lint says the same (ui-app-palette-never-reaches-the-kits):

! `Colors.Accent` (model/theme.osy:12) is declared and nothing reads it, while Ui paint with `Colors.Primary` at the floor's #087885. One line in your theme's Colors ties them: Primary = Colors.Accent;

The rule needs either the name (Accent, Brand → Primary) or a theme that re-themed none of the floor; a colour of your own in a theme that HAS re-themed the floor is your own design, and is left alone.

How it differs from osy kit tokens and osy theme#

osy kit tokens is the floor alone — the same for every app. osy theme is what you may write here: the floor's groups and your theme's. --app is what the app comes to once its kits are in it, which only the composition knows.

Examples#

osy kit tokens --app                # every token the app or its kits read or declare
osy kit tokens --app Colors         # one group
osy kit tokens --app --json         # for tools

From a help desk with the conversations and chart kits:

Colors
  Border          #DCE2E0 / #233032  floor  read by Automations, Composer, Conversations, Inbox, Knowledge, Ui, app
  ConversationAi  #7445B8 / #B79BF2  kit Conversations  read by Conversations
                  a kit's own colour: What an AI wrote: the mark on its entries, the hairline round its drafts, and (`.Subtle`) a draft's wash.
  Primary         #087885 / #33CAD8  floor  read by Accounts, Composer, Conversations, Inbox, Knowledge, Reports, Ui, app
  Series1         #087885 / #33CAD8  app → Colors.Primary (over Charts)  read by Charts

--json carries every row as { group, name, source, declaredBy, value, light, dark, refersTo, replaces, readBy, literalKitDefault, reason }, the looks, and unmapped — each app colour nothing reads with the floor token it was meant to be and the mapping line.

See also#

Related

theme tokens

A `theme` block names your app's design tokens — colors, spacing, radii, and more — as reusable values. A token can…

Reading your theme

Prints everything your app's theme advertises — every group, every token, each token's value or its light/dark pair…

Osysharp.Ui (the UI kit)

The bundled UI kit — ready-made styled controls like `Button`, the shared design-system vocabularies (`Tone`, `Size`)…

Composing kits — what they give together, and what is left for you

Before any code, shows what a set of kits gives together — the bridges that arrive by themselves, every event with its…