Skip to content

Colors: the scheme follows the Figma UI Kit, light and dark - #2879

Open
yasell wants to merge 3 commits into
CopilotKit:mainfrom
yasell:redesign/colors-figma
Open

yasell wants to merge 3 commits into
CopilotKit:mainfrom
yasell:redesign/colors-figma

Conversation

@yasell

@yasell yasell commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

The Figma UI Kit now has a dark theme: the Light and Dark modes of its Semantic variable
collection (2026-12-03). This pull request sets the scheme's colors to it in
tokens/src/scheme.ts, and bun run tokens:generate writes them into every copy: the web app,
OpenBot Desktop, OpenBot Mobile, the manifest and the artifacts' kit. It also adds the kit's
fourth status, in-progress, as a token beside success, warning and destructive. No token is
renamed or removed, and no primitive or screen changes: every screen takes the new values from the
tokens.

Each of the kit's hex values was converted to OKLCH and back through tokens/src/color.ts and
through Color.js, and both give the kit's hex exactly.

Light

Token main This pull request Kit
background #f8fafb #fafafa neutral/95
foreground, primary and every *-foreground on a light fill #010313 #0b121a neutral/10
secondary, accent #ecf1f6 #edf3fa neutral/90
muted #ecf1f6 #e7eaf0 neutral/85
muted-foreground #55667f #525960 neutral/30
ring, sidebar-ring #727eef #6f7fb9 lavender/50
sidebar #e9eef4 #e7eaf0 neutral/85
success #12795b #08684f success/20
warning #a84900 #a03e00 warning/25 (the kit's Semantic has warning/30, #a84900: see Contrast)
in-progress (new) #0b49bb in progress/30
border, input, sidebar-border #010313 at 10% #0b121a at 10% see Lines, below

card, popover and primary-foreground stay white, and destructive (#a31526) is already the
kit's.

Dark

Token main This pull request Kit
background #0d1319 #0b121a neutral/10
card, popover #131920 #111820 neutral/12
foreground, primary and every *-foreground on a dark fill #eef1f3 #edf3fa neutral/90
primary-foreground, sidebar-primary-foreground #020409 #0b121a neutral/10
secondary #1c232a #1d232a neutral/15
muted #1c232a #30363d neutral/20
accent #232a31 #30363d neutral/20
muted-foreground #949ca5 #9fa5ac neutral/60
ring, sidebar-ring #8d97ff #6f7fb9 lavender/50, as in light
sidebar #070d14 #030508 neutral/4
success #5fe3bb #45d3b0 success/60
warning #ffb900 #ff9e40 warning/65
destructive #ff9aa0 #fdafb6 destructive/80 #f6a8af, a shade lighter (see Contrast)
in-progress (new) #a5c5ff in progress/80
border, input, sidebar-border #eef1f3 at 12% #edf3fa at 12% see Lines, below

A fourth status: in-progress

The kit marks what is still running in a status of its own, Status/in-progress, a blue. It
becomes a token like the other three: it means what is under way and has no outcome yet, a run, a
task or a step that hasn't finished. bg-in-progress/10, text-in-progress and bg-in-progress
work in the web app and in an artifact's page (--color-in-progress in theme.css's @theme, and
the bridge passes it to a page like every other color of the scheme). OpenBot Mobile's
src/scheme.ts has it too. OpenBot Desktop's stylesheets and OpenBot Mobile's HeroUI Native names
take only the colors they draw, and neither draws it yet. Nothing on a screen uses it yet either.

app/tests/design-tokens.test.ts lets theme.css declare it beside success and warning, and
docs/design-system.md and docs/app-guidelines.md name it and what it means.

What changes in the levels

The levels keep their order in both modes, frame darker than panel, panel darker than card
(app/tests/design-tokens.test.ts), and in dark the fills stay lighter than the card. Two things
read differently:

  • In light, secondary and accent are one pale blue and muted is a step deeper, the sidebar's
    tint. On main all three were one color.
  • In dark, muted and accent are a step above secondary rather than equal to it, and the frame
    is close to black.

The grays stay one family (tokens/tests/slate.test.ts): in light every tinted gray sits between
hues 248 and 265 and the panel has no tint; in dark every gray sits at hue 252 with chroma 0.02 or
less.

Lines

The kit draws its lines opaque (#e7e7e8, #2b323a). The rule here is that every line is the
text color at one strength (app/tests/ui-look-theme.test.ts), so this pull request keeps that
rule and only moves the lines to the new text color: 1.23:1 against a card in light (1.25:1 on
main) and 1.38:1 in dark, as before. The opaque lines come with #2801, which
changes the rule. Whichever of the two lands second takes #2801's lines in scheme.ts and
regenerates.

Contrast

tokens/tests/contrast.test.ts gains three sets of pairs:

  • in-progress as text on the page and on a card, as the other statuses have.
  • A status badge's words, in the status's color on its own 10% tint, for all four statuses, on the
    page, a card, a menu, a muted row and the sidebar, at 4.5:1. That is how the kit draws a badge.
  • The same words on the 12% tint a badge drawn as a chip (a link or a button) deepens to under the
    pointer, as the kit's chip does: 4.59:1 at the lowest in light (warning over a muted row), 4.77:1
    in dark.

Every pair passes in light and in dark. The badge pairs, at their lowest:

Status words on their 10% tint Light, lowest (over muted and the sidebar) Dark, lowest (over muted)
success 4.87 5.33
warning 4.73 4.96
destructive 5.46 5.63
in-progress 5.56 5.62

Two values move off the kit's Semantic to pass:

  • Light warning is the kit's warning/25 (#a03e00) where Semantic has warning/30
    (#a84900): #a84900's words on its tint reach 4.20:1 over a muted row and over the sidebar.
    #a03e00 reads at 5.43:1 over the page, 5.65:1 over a card and 4.73:1 over a muted row and the
    sidebar, and 6.60:1 as text on white. The kit's Semantic warning in Light should take
    warning/25 too.
  • Dark destructive keeps the kit's hue and chroma, a shade lighter (OKLCH lightness 0.809 to
    0.829): with the kit's #f6a8af, its words on a destructive/20 hover over a muted row (a pair
    Base components: radio group, badge, alert, checkbox, tabs, table, Item rows and toast #2801 adds) reach 4.29:1; with #fdafb6, 4.52:1.

The rest of the pairs, main beside this pull request:

Pair Light, main Light, this PR Dark, main Dark, this PR
foreground on background 19.59 18.03 16.47 16.85
foreground on card 20.51 18.82 15.59 16.00
muted-foreground on background 5.58 6.80 6.72 7.58
muted-foreground on card 5.84 7.10 6.36 7.19
muted-foreground on muted 5.14 5.89 5.71 4.91
primary-foreground on primary 20.51 18.82 18.08 16.85
sidebar-foreground on sidebar 17.58 15.62 17.19 18.27
sidebar-accent-foreground on the selected row 15.77 14.13 13.89 15.25
destructive on card 7.80 7.80 8.74 10.20
success on card 5.37 6.77 11.11 9.53
warning on card 5.80 6.60 10.27 8.69
in-progress on card 7.82 10.24
ring on background 3.37 3.72 7.12 4.85
ring on card 3.53 3.88 6.74 4.60
sidebar-ring on sidebar 3.03 3.22 7.43 5.26

The values were also run against #2801's version of that test, which adds alerts on their tints
and the ring on a dialog and on a muted row: 155 of 155 pass.

Not in this pull request

  • The kit's sidebar-accent (lavender/70 at 30%), its empty-pattern-color and its six chart
    colors come separately.
  • A person's theme for an artifact sets success, warning and destructive but not
    in-progress: that is a change to the artifact theme's shape, for later.
  • The terminal keeps its own palette (terminal-theme.ts), tuned for its own dark ground.

Other changes

  • mobile/app.config.ts: the splash's background, written out by hand, follows the scheme
    (mobile/tests/launch-splash.test.ts holds them equal).
  • tokens/tests/generated.test.ts: the phone's warnings, pinned there, are #a03e00 and
    #ff9e40.
  • app/src/lib/artifacts/bridge/wire.ts: in-progress in the colors the bridge passes
    (app/tests/artifact-bridge-tokens.test.ts holds that list to the scheme).
  • docs/app-guidelines.md: the paragraph on the grays, and in-progress in the token list and
    in what each color means. docs/design-system.md: in-progress beside success and warning.
  • app/tests/skins.test.ts: a comment that said secondary, muted and accent are one color in light.

What I looked at

A gallery built from the app's own primitives: the sidebar with a selected row, a row under the
pointer and a row with keyboard focus; a card with a focused field, a checkbox, switches and every
button variant; a menu with its highlighted row; the badges; rows with statuses; and every surface
with text, quieter text, the statuses, the ring and a line. main beside this pull request, light
and dark, then this pull request under each skin. The in-progress row and chip are drawn only in
this pull request, since main has no such color. Hover and focus are forced through DevTools.

01-screen-light

01-screen-dark

02-levels-light

02-levels-dark

03-skins

Checks

  • bun test in tokens/ (152 tests).
  • In app/: design-tokens, ui-look-theme, skins, skins-opendots-a11y,
    artifact-theme-contrast, artifact-bridge-tokens, color-scheme (168 tests); in Chromium and
    WebKit, the skins' browser tests, checkbox-contrast and desktop-window-theme (124 pass, 1
    skipped: it only takes screenshots).
  • In mobile/: launch-splash (3 tests).
  • bun run typecheck in app/; biome lint and biome format on the changed files.

Sets the scheme's colors to the Light and Dark modes of the Figma UI Kit's
Semantic collection (2026-12-03) and writes them into every app's copy.
The lines stay the text color at 10% and 12%, now of the new text color;
the dark destructive is the kit's, a shade lighter, so its words read at
4.5:1 on a destructive/20 hover over a muted row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yasell and others added 2 commits December 4, 2026 11:18
Light warning takes the kit's warning/25 (#a03e00), so a badge's words in
the status color on its 10% tint read at 4.5:1 over a muted row and the
sidebar. The kit's Status/in-progress becomes a token beside success,
warning and destructive: light #0b49bb, dark #a5c5ff, in the web app's
@theme and the colors the artifacts bridge passes. The contrast test holds
every status's words on its own tint, on each surface a badge stands on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A badge drawn as a chip (a link or a button) deepens its tint to 12% under
the pointer, as the kit's chip does. The contrast test holds each status's
words on that tint too, on every surface a badge stands on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant