From 80c90b64f10d0c766c5b5337e12646f07112179e Mon Sep 17 00:00:00 2001 From: Raman Yasel Date: Thu, 3 Dec 2026 20:12:54 +0300 Subject: [PATCH 1/3] Colors: the scheme follows the Figma UI Kit, light and dark 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 --- app/public/manifest.webmanifest | 4 +- app/src/lib/artifacts/tokens.css | 96 ++++++++-------- app/src/theme.css | 96 ++++++++-------- app/tests/skins.test.ts | 4 +- desktop/src-tauri/src/connected/sign_in.rs | 22 ++-- desktop/src-tauri/src/first_paint.rs | 18 +-- desktop/src/styles.css | 50 ++++----- docs/app-guidelines.md | 5 +- mobile/app.config.ts | 4 +- mobile/global.css | 124 ++++++++++----------- mobile/src/scheme.ts | 96 ++++++++-------- tokens/src/scheme.ts | 121 ++++++++++---------- tokens/tests/generated.test.ts | 2 +- 13 files changed, 325 insertions(+), 317 deletions(-) diff --git a/app/public/manifest.webmanifest b/app/public/manifest.webmanifest index d2f59f8a6a..4deba14086 100644 --- a/app/public/manifest.webmanifest +++ b/app/public/manifest.webmanifest @@ -5,8 +5,8 @@ "start_url": "/", "scope": "/", "display": "standalone", - "background_color": "#f8fafb", - "theme_color": "#f8fafb", + "background_color": "#fafafa", + "theme_color": "#fafafa", "icons": [ { "src": "/icon-192.png", diff --git a/app/src/lib/artifacts/tokens.css b/app/src/lib/artifacts/tokens.css index 1c1d3ce30e..7e317803cb 100644 --- a/app/src/lib/artifacts/tokens.css +++ b/app/src/lib/artifacts/tokens.css @@ -2,77 +2,77 @@ :root { color-scheme: light; - --background: oklch(0.983 0.003 247.9); - --foreground: oklch(0.108 0.042 264.7); + --background: oklch(0.985 0 0); + --foreground: oklch(0.179 0.02 252.2); --card: oklch(1 0 0); - --card-foreground: oklch(0.108 0.042 264.7); + --card-foreground: oklch(0.179 0.02 252.2); --popover: oklch(1 0 0); - --popover-foreground: oklch(0.108 0.042 264.7); - --primary: oklch(0.108 0.042 264.7); + --popover-foreground: oklch(0.179 0.02 252.2); + --primary: oklch(0.179 0.02 252.2); --primary-foreground: oklch(1 0 0); - --secondary: oklch(0.956 0.009 250.2); - --secondary-foreground: oklch(0.108 0.042 264.7); - --muted: oklch(0.956 0.009 250.2); - --muted-foreground: oklch(0.506 0.045 257.4); - --accent: oklch(0.956 0.009 250.2); - --accent-foreground: oklch(0.108 0.042 264.7); + --secondary: oklch(0.962 0.011 252.1); + --secondary-foreground: oklch(0.179 0.02 252.2); + --muted: oklch(0.936 0.009 264.5); + --muted-foreground: oklch(0.46 0.014 248.1); + --accent: oklch(0.962 0.011 252.1); + --accent-foreground: oklch(0.179 0.02 252.2); --destructive: oklch(0.46 0.173 22.6); - --success: oklch(0.514 0.1 167.2); + --success: oklch(0.461 0.0903 168.6); --warning: oklch(0.521 0.143 47.7); - --border: oklch(0.108 0.042 264.7 / 10%); - --input: oklch(0.108 0.042 264.7 / 10%); - --ring: oklch(0.638 0.167 276.1); + --border: oklch(0.179 0.02 252.2 / 10%); + --input: oklch(0.179 0.02 252.2 / 10%); + --ring: oklch(0.607 0.09 271.7); --chart-1: oklch(0.46 0.2 264); --chart-2: oklch(0.66 0.146 66); --chart-3: oklch(0.62 0.122 170); --chart-4: oklch(0.5 0.2 18); --chart-5: oklch(0.6 0.2 286); --empty-pattern-color: oklch(0.746 0.117 279.9); - --sidebar: oklch(0.948 0.01 251.8); - --sidebar-foreground: oklch(0.108 0.042 264.7); - --sidebar-primary: oklch(0.108 0.042 264.7); + --sidebar: oklch(0.936 0.009 264.5); + --sidebar-foreground: oklch(0.179 0.02 252.2); + --sidebar-primary: oklch(0.179 0.02 252.2); --sidebar-primary-foreground: oklch(1 0 0); --sidebar-accent: oklch(0.832 0.085 281.4 / 30%); - --sidebar-accent-foreground: oklch(0.108 0.042 264.7); - --sidebar-border: oklch(0.108 0.042 264.7 / 10%); - --sidebar-ring: oklch(0.638 0.167 276.1); + --sidebar-accent-foreground: oklch(0.179 0.02 252.2); + --sidebar-border: oklch(0.179 0.02 252.2 / 10%); + --sidebar-ring: oklch(0.607 0.09 271.7); --radius: 0.625rem; } .dark { color-scheme: dark; - --background: oklch(0.182 0.017 252); - --foreground: oklch(0.956 0.004 252); - --card: oklch(0.212 0.017 252); - --card-foreground: oklch(0.956 0.004 252); - --popover: oklch(0.212 0.017 252); - --popover-foreground: oklch(0.956 0.004 252); - --primary: oklch(0.956 0.004 252); - --primary-foreground: oklch(0.108 0.017 252); - --secondary: oklch(0.253 0.017 252); - --secondary-foreground: oklch(0.956 0.004 252); - --muted: oklch(0.253 0.017 252); - --muted-foreground: oklch(0.69 0.016 252); - --accent: oklch(0.28 0.016 252); - --accent-foreground: oklch(0.956 0.004 252); - --destructive: oklch(0.792 0.121 16.4); - --success: oklch(0.832 0.13 170.1); - --warning: oklch(0.828 0.189 84.4); - --border: oklch(0.956 0.004 252 / 12%); - --input: oklch(0.956 0.004 252 / 12%); - --ring: oklch(0.713 0.151 277.7); + --background: oklch(0.179 0.02 252.2); + --foreground: oklch(0.962 0.011 252.1); + --card: oklch(0.206 0.019 252.1); + --card-foreground: oklch(0.962 0.011 252.1); + --popover: oklch(0.206 0.019 252.1); + --popover-foreground: oklch(0.962 0.011 252.1); + --primary: oklch(0.962 0.011 252.1); + --primary-foreground: oklch(0.179 0.02 252.2); + --secondary: oklch(0.253 0.016 252.4); + --secondary-foreground: oklch(0.962 0.011 252.1); + --muted: oklch(0.33 0.015 252.3); + --muted-foreground: oklch(0.719 0.012 252.1); + --accent: oklch(0.33 0.015 252.3); + --accent-foreground: oklch(0.962 0.011 252.1); + --destructive: oklch(0.829 0.092 13.4); + --success: oklch(0.782 0.1307 173); + --warning: oklch(0.783 0.156 60.7); + --border: oklch(0.962 0.011 252.1 / 12%); + --input: oklch(0.962 0.011 252.1 / 12%); + --ring: oklch(0.607 0.09 271.7); --chart-1: oklch(0.58 0.2 264); --chart-2: oklch(0.76 0.168 66); --chart-3: oklch(0.86 0.17 170); --chart-4: oklch(0.6 0.2 18); --chart-5: oklch(0.76 0.128 286); --empty-pattern-color: oklch(0.832 0.085 281.4); - --sidebar: oklch(0.156 0.017 252); - --sidebar-foreground: oklch(0.956 0.004 252); - --sidebar-primary: oklch(0.956 0.004 252); - --sidebar-primary-foreground: oklch(0.108 0.017 252); + --sidebar: oklch(0.113 0.011 251.8); + --sidebar-foreground: oklch(0.962 0.011 252.1); + --sidebar-primary: oklch(0.962 0.011 252.1); + --sidebar-primary-foreground: oklch(0.179 0.02 252.2); --sidebar-accent: oklch(0.832 0.085 281.4 / 12%); - --sidebar-accent-foreground: oklch(0.956 0.004 252); - --sidebar-border: oklch(0.956 0.004 252 / 12%); - --sidebar-ring: oklch(0.713 0.151 277.7); + --sidebar-accent-foreground: oklch(0.962 0.011 252.1); + --sidebar-border: oklch(0.962 0.011 252.1 / 12%); + --sidebar-ring: oklch(0.607 0.09 271.7); } diff --git a/app/src/theme.css b/app/src/theme.css index 6bc3c73c7a..4d6c01dc1e 100644 --- a/app/src/theme.css +++ b/app/src/theme.css @@ -14,40 +14,40 @@ * light and dark value and what it means live. Change a color there, never here. */ /* tokens/src/scheme.ts, light: all (bun run tokens:generate) */ - --background: oklch(0.983 0.003 247.9); - --foreground: oklch(0.108 0.042 264.7); + --background: oklch(0.985 0 0); + --foreground: oklch(0.179 0.02 252.2); --card: oklch(1 0 0); - --card-foreground: oklch(0.108 0.042 264.7); + --card-foreground: oklch(0.179 0.02 252.2); --popover: oklch(1 0 0); - --popover-foreground: oklch(0.108 0.042 264.7); - --primary: oklch(0.108 0.042 264.7); + --popover-foreground: oklch(0.179 0.02 252.2); + --primary: oklch(0.179 0.02 252.2); --primary-foreground: oklch(1 0 0); - --secondary: oklch(0.956 0.009 250.2); - --secondary-foreground: oklch(0.108 0.042 264.7); - --muted: oklch(0.956 0.009 250.2); - --muted-foreground: oklch(0.506 0.045 257.4); - --accent: oklch(0.956 0.009 250.2); - --accent-foreground: oklch(0.108 0.042 264.7); + --secondary: oklch(0.962 0.011 252.1); + --secondary-foreground: oklch(0.179 0.02 252.2); + --muted: oklch(0.936 0.009 264.5); + --muted-foreground: oklch(0.46 0.014 248.1); + --accent: oklch(0.962 0.011 252.1); + --accent-foreground: oklch(0.179 0.02 252.2); --destructive: oklch(0.46 0.173 22.6); - --success: oklch(0.514 0.1 167.2); + --success: oklch(0.461 0.0903 168.6); --warning: oklch(0.521 0.143 47.7); - --border: oklch(0.108 0.042 264.7 / 10%); - --input: oklch(0.108 0.042 264.7 / 10%); - --ring: oklch(0.638 0.167 276.1); + --border: oklch(0.179 0.02 252.2 / 10%); + --input: oklch(0.179 0.02 252.2 / 10%); + --ring: oklch(0.607 0.09 271.7); --chart-1: oklch(0.46 0.2 264); --chart-2: oklch(0.66 0.146 66); --chart-3: oklch(0.62 0.122 170); --chart-4: oklch(0.5 0.2 18); --chart-5: oklch(0.6 0.2 286); --empty-pattern-color: oklch(0.746 0.117 279.9); - --sidebar: oklch(0.948 0.01 251.8); - --sidebar-foreground: oklch(0.108 0.042 264.7); - --sidebar-primary: oklch(0.108 0.042 264.7); + --sidebar: oklch(0.936 0.009 264.5); + --sidebar-foreground: oklch(0.179 0.02 252.2); + --sidebar-primary: oklch(0.179 0.02 252.2); --sidebar-primary-foreground: oklch(1 0 0); --sidebar-accent: oklch(0.832 0.085 281.4 / 30%); - --sidebar-accent-foreground: oklch(0.108 0.042 264.7); - --sidebar-border: oklch(0.108 0.042 264.7 / 10%); - --sidebar-ring: oklch(0.638 0.167 276.1); + --sidebar-accent-foreground: oklch(0.179 0.02 252.2); + --sidebar-border: oklch(0.179 0.02 252.2 / 10%); + --sidebar-ring: oklch(0.607 0.09 271.7); /* end of tokens/src/scheme.ts */ /* * Every corner comes from this (docs/app-guidelines.md, "The look"), the design's radius base: @@ -67,40 +67,40 @@ .dark { color-scheme: dark; /* tokens/src/scheme.ts, dark: all (bun run tokens:generate) */ - --background: oklch(0.182 0.017 252); - --foreground: oklch(0.956 0.004 252); - --card: oklch(0.212 0.017 252); - --card-foreground: oklch(0.956 0.004 252); - --popover: oklch(0.212 0.017 252); - --popover-foreground: oklch(0.956 0.004 252); - --primary: oklch(0.956 0.004 252); - --primary-foreground: oklch(0.108 0.017 252); - --secondary: oklch(0.253 0.017 252); - --secondary-foreground: oklch(0.956 0.004 252); - --muted: oklch(0.253 0.017 252); - --muted-foreground: oklch(0.69 0.016 252); - --accent: oklch(0.28 0.016 252); - --accent-foreground: oklch(0.956 0.004 252); - --destructive: oklch(0.792 0.121 16.4); - --success: oklch(0.832 0.13 170.1); - --warning: oklch(0.828 0.189 84.4); - --border: oklch(0.956 0.004 252 / 12%); - --input: oklch(0.956 0.004 252 / 12%); - --ring: oklch(0.713 0.151 277.7); + --background: oklch(0.179 0.02 252.2); + --foreground: oklch(0.962 0.011 252.1); + --card: oklch(0.206 0.019 252.1); + --card-foreground: oklch(0.962 0.011 252.1); + --popover: oklch(0.206 0.019 252.1); + --popover-foreground: oklch(0.962 0.011 252.1); + --primary: oklch(0.962 0.011 252.1); + --primary-foreground: oklch(0.179 0.02 252.2); + --secondary: oklch(0.253 0.016 252.4); + --secondary-foreground: oklch(0.962 0.011 252.1); + --muted: oklch(0.33 0.015 252.3); + --muted-foreground: oklch(0.719 0.012 252.1); + --accent: oklch(0.33 0.015 252.3); + --accent-foreground: oklch(0.962 0.011 252.1); + --destructive: oklch(0.829 0.092 13.4); + --success: oklch(0.782 0.1307 173); + --warning: oklch(0.783 0.156 60.7); + --border: oklch(0.962 0.011 252.1 / 12%); + --input: oklch(0.962 0.011 252.1 / 12%); + --ring: oklch(0.607 0.09 271.7); --chart-1: oklch(0.58 0.2 264); --chart-2: oklch(0.76 0.168 66); --chart-3: oklch(0.86 0.17 170); --chart-4: oklch(0.6 0.2 18); --chart-5: oklch(0.76 0.128 286); --empty-pattern-color: oklch(0.832 0.085 281.4); - --sidebar: oklch(0.156 0.017 252); - --sidebar-foreground: oklch(0.956 0.004 252); - --sidebar-primary: oklch(0.956 0.004 252); - --sidebar-primary-foreground: oklch(0.108 0.017 252); + --sidebar: oklch(0.113 0.011 251.8); + --sidebar-foreground: oklch(0.962 0.011 252.1); + --sidebar-primary: oklch(0.962 0.011 252.1); + --sidebar-primary-foreground: oklch(0.179 0.02 252.2); --sidebar-accent: oklch(0.832 0.085 281.4 / 12%); - --sidebar-accent-foreground: oklch(0.956 0.004 252); - --sidebar-border: oklch(0.956 0.004 252 / 12%); - --sidebar-ring: oklch(0.713 0.151 277.7); + --sidebar-accent-foreground: oklch(0.962 0.011 252.1); + --sidebar-border: oklch(0.962 0.011 252.1 / 12%); + --sidebar-ring: oklch(0.607 0.09 271.7); /* end of tokens/src/scheme.ts */ --empty-pattern-opacity: 0.15; } diff --git a/app/tests/skins.test.ts b/app/tests/skins.test.ts index b700abdcd5..9a1b9ed921 100644 --- a/app/tests/skins.test.ts +++ b/app/tests/skins.test.ts @@ -221,8 +221,8 @@ describe("skin stylesheets", () => { /* * Each state a skin draws is a fill of its own, in light and in dark, and a stronger one than the - * state before it. In light the scheme's secondary, muted and accent are one color, so a skin that - * pointed its hover at one and its selected tab at another drew them alike; in dark the accent is + * state before it. In light the scheme's secondary and accent are one color, so a skin that + * pointed its hover at one and its selected tab at the other drew them alike; in dark the accent is * brighter than the sidebar's tint, so a hovered row outshone the open one. Each step, from the * surface under it, is at least 1.04:1 from the one before (the scheme's own page and a card on it * are about 1.05:1 apart), and further from that surface. diff --git a/desktop/src-tauri/src/connected/sign_in.rs b/desktop/src-tauri/src/connected/sign_in.rs index 6c3a15d8c4..683137541c 100644 --- a/desktop/src-tauri/src/connected/sign_in.rs +++ b/desktop/src-tauri/src/connected/sign_in.rs @@ -1363,12 +1363,12 @@ this page fetches none. const END_PAGE_STYLE: &str = r#" :root { /* tokens/src/scheme.ts, light: background foreground card muted-foreground border sidebar (bun run tokens:generate) */ - --background: oklch(0.983 0.003 247.9); - --foreground: oklch(0.108 0.042 264.7); + --background: oklch(0.985 0 0); + --foreground: oklch(0.179 0.02 252.2); --card: oklch(1 0 0); - --muted-foreground: oklch(0.506 0.045 257.4); - --border: oklch(0.108 0.042 264.7 / 10%); - --sidebar: oklch(0.948 0.01 251.8); + --muted-foreground: oklch(0.46 0.014 248.1); + --border: oklch(0.179 0.02 252.2 / 10%); + --sidebar: oklch(0.936 0.009 264.5); /* end of tokens/src/scheme.ts */ --shadow: 0 1px 2px oklch(0.108 0.042 264.7 / 4%), 0 24px 64px -16px oklch(0.45 0.12 276 / 22%); --glow: oklch(0.82 0.08 285 / 55%); @@ -1378,12 +1378,12 @@ const END_PAGE_STYLE: &str = r#" @media (prefers-color-scheme: dark) { :root { /* tokens/src/scheme.ts, dark: background foreground card muted-foreground border sidebar (bun run tokens:generate) */ - --background: oklch(0.182 0.017 252); - --foreground: oklch(0.956 0.004 252); - --card: oklch(0.212 0.017 252); - --muted-foreground: oklch(0.69 0.016 252); - --border: oklch(0.956 0.004 252 / 12%); - --sidebar: oklch(0.156 0.017 252); + --background: oklch(0.179 0.02 252.2); + --foreground: oklch(0.962 0.011 252.1); + --card: oklch(0.206 0.019 252.1); + --muted-foreground: oklch(0.719 0.012 252.1); + --border: oklch(0.962 0.011 252.1 / 12%); + --sidebar: oklch(0.113 0.011 251.8); /* end of tokens/src/scheme.ts */ --shadow: 0 1px 2px oklch(0 0 0 / 30%), 0 24px 64px -16px oklch(0 0 0 / 60%); --glow: oklch(0.45 0.12 280 / 28%); diff --git a/desktop/src-tauri/src/first_paint.rs b/desktop/src-tauri/src/first_paint.rs index 77baa2480a..151e172a42 100644 --- a/desktop/src-tauri/src/first_paint.rs +++ b/desktop/src-tauri/src/first_paint.rs @@ -65,22 +65,22 @@ pub struct Palette { /// Light: the scheme's sidebar, card, border, foreground and muted-foreground, in sRGB. pub const LIGHT: Palette = Palette { // tokens/src/scheme.ts, light: ground=sidebar card=card border=border ink=foreground soft=muted-foreground (bun run tokens:generate) - ground: (0xe9, 0xee, 0xf4), + ground: (0xe7, 0xea, 0xf0), card: (0xff, 0xff, 0xff), - border: (0xe6, 0xe6, 0xe7), - ink: (0x01, 0x03, 0x13), - soft: (0x55, 0x66, 0x7f), + border: (0xe7, 0xe7, 0xe8), + ink: (0x0b, 0x12, 0x1a), + soft: (0x52, 0x59, 0x60), // end of tokens/src/scheme.ts }; /// Dark: the same five, in sRGB. pub const DARK: Palette = Palette { // tokens/src/scheme.ts, dark: ground=sidebar card=card border=border ink=foreground soft=muted-foreground (bun run tokens:generate) - ground: (0x07, 0x0d, 0x14), - card: (0x13, 0x19, 0x20), - border: (0x2d, 0x33, 0x39), - ink: (0xee, 0xf1, 0xf3), - soft: (0x94, 0x9c, 0xa5), + ground: (0x03, 0x05, 0x08), + card: (0x11, 0x18, 0x20), + border: (0x2b, 0x32, 0x3a), + ink: (0xed, 0xf3, 0xfa), + soft: (0x9f, 0xa5, 0xac), // end of tokens/src/scheme.ts }; diff --git a/desktop/src/styles.css b/desktop/src/styles.css index f15a804dc0..444ccc8f4b 100644 --- a/desktop/src/styles.css +++ b/desktop/src/styles.css @@ -22,20 +22,20 @@ * (and here the whole ground) shares. */ /* tokens/src/scheme.ts, light: background foreground card primary primary-foreground secondary muted muted-foreground destructive success border input ring sidebar sidebar-accent (bun run tokens:generate) */ - --background: oklch(0.983 0.003 247.9); - --foreground: oklch(0.108 0.042 264.7); + --background: oklch(0.985 0 0); + --foreground: oklch(0.179 0.02 252.2); --card: oklch(1 0 0); - --primary: oklch(0.108 0.042 264.7); + --primary: oklch(0.179 0.02 252.2); --primary-foreground: oklch(1 0 0); - --secondary: oklch(0.956 0.009 250.2); - --muted: oklch(0.956 0.009 250.2); - --muted-foreground: oklch(0.506 0.045 257.4); + --secondary: oklch(0.962 0.011 252.1); + --muted: oklch(0.936 0.009 264.5); + --muted-foreground: oklch(0.46 0.014 248.1); --destructive: oklch(0.46 0.173 22.6); - --success: oklch(0.514 0.1 167.2); - --border: oklch(0.108 0.042 264.7 / 10%); - --input: oklch(0.108 0.042 264.7 / 10%); - --ring: oklch(0.638 0.167 276.1); - --sidebar: oklch(0.948 0.01 251.8); + --success: oklch(0.461 0.0903 168.6); + --border: oklch(0.179 0.02 252.2 / 10%); + --input: oklch(0.179 0.02 252.2 / 10%); + --ring: oklch(0.607 0.09 271.7); + --sidebar: oklch(0.936 0.009 264.5); --sidebar-accent: oklch(0.832 0.085 281.4 / 30%); /* end of tokens/src/scheme.ts */ --radius: 0.625rem; @@ -2517,20 +2517,20 @@ main > .sheet:has(.journey.handing-off) .self-contained-why { @media (prefers-color-scheme: dark) { :root { /* tokens/src/scheme.ts, dark: background foreground card primary primary-foreground secondary muted muted-foreground destructive success border input ring sidebar sidebar-accent (bun run tokens:generate) */ - --background: oklch(0.182 0.017 252); - --foreground: oklch(0.956 0.004 252); - --card: oklch(0.212 0.017 252); - --primary: oklch(0.956 0.004 252); - --primary-foreground: oklch(0.108 0.017 252); - --secondary: oklch(0.253 0.017 252); - --muted: oklch(0.253 0.017 252); - --muted-foreground: oklch(0.69 0.016 252); - --destructive: oklch(0.792 0.121 16.4); - --success: oklch(0.832 0.13 170.1); - --border: oklch(0.956 0.004 252 / 12%); - --input: oklch(0.956 0.004 252 / 12%); - --ring: oklch(0.713 0.151 277.7); - --sidebar: oklch(0.156 0.017 252); + --background: oklch(0.179 0.02 252.2); + --foreground: oklch(0.962 0.011 252.1); + --card: oklch(0.206 0.019 252.1); + --primary: oklch(0.962 0.011 252.1); + --primary-foreground: oklch(0.179 0.02 252.2); + --secondary: oklch(0.253 0.016 252.4); + --muted: oklch(0.33 0.015 252.3); + --muted-foreground: oklch(0.719 0.012 252.1); + --destructive: oklch(0.829 0.092 13.4); + --success: oklch(0.782 0.1307 173); + --border: oklch(0.962 0.011 252.1 / 12%); + --input: oklch(0.962 0.011 252.1 / 12%); + --ring: oklch(0.607 0.09 271.7); + --sidebar: oklch(0.113 0.011 251.8); --sidebar-accent: oklch(0.832 0.085 281.4 / 12%); /* end of tokens/src/scheme.ts */ diff --git a/docs/app-guidelines.md b/docs/app-guidelines.md index dc973e180f..2ce7518593 100644 --- a/docs/app-guidelines.md +++ b/docs/app-guidelines.md @@ -20,8 +20,9 @@ light and a dark value and what it means: `background`, `foreground`, `card`, `p `secondary`, `muted`, `accent`, `destructive`, `success`, `warning`, `border`, `input` and `ring`, and the chart and sidebar sets. -The grays are Tailwind's slate. In light each gray is slate at its own lightness; in dark, slate's -hue moves from 265 to 252 with 40% of its tint, since slate's own dark leans indigo and reads purple. +The grays are quiet blue-grays, the neutrals of the design's UI kit. In light each sits on one of +Tailwind slate's hues with a fainter tint, and the panel is a near-white with none; in dark every +gray sits on one hue, 252, with a faint tint, since slate's own dark leans indigo and reads purple. CopilotKit's lavender marks only what it means: the `ring`, the selected sidebar row (`sidebar-accent`) and the empty pattern. `tokens/tests/slate.test.ts` holds both. diff --git a/mobile/app.config.ts b/mobile/app.config.ts index a787ef8ebf..b13d595fe2 100644 --- a/mobile/app.config.ts +++ b/mobile/app.config.ts @@ -21,8 +21,8 @@ const openbotRelease = ( */ export const SPLASH = { orbWidth: 112, - light: "#f8fafb", - dark: "#0d1319", + light: "#fafafa", + dark: "#0b121a", } as const; /** * Firebase's settings for the Android app, which Android needs to get a push token. A build on EAS diff --git a/mobile/global.css b/mobile/global.css index 87f0a846eb..4d7cc8dc2c 100644 --- a/mobile/global.css +++ b/mobile/global.css @@ -33,84 +33,84 @@ :root { @variant light { /* tokens/src/scheme.ts, light: --background=background --foreground=foreground --surface=card --surface-foreground=card-foreground --surface-secondary=secondary --surface-secondary-foreground=secondary-foreground --surface-tertiary=accent --surface-tertiary-foreground=accent-foreground --overlay=popover --overlay-foreground=popover-foreground --muted=muted-foreground --default=secondary --default-foreground=secondary-foreground --accent=primary --accent-foreground=primary-foreground --field-background=card --field-foreground=foreground --field-placeholder=muted-foreground --field-border=input --success=success --success-foreground=primary-foreground --warning=warning --warning-foreground=primary-foreground --danger=destructive --danger-foreground=primary-foreground --segment=card --segment-foreground=foreground --border=border --separator=border --focus=ring --link=foreground --fill=muted --sidebar=sidebar --sidebar-foreground=sidebar-foreground --sidebar-accent=sidebar-accent --sidebar-accent-foreground=sidebar-accent-foreground --sidebar-border=sidebar-border (bun run tokens:generate) */ - --background: oklch(0.983 0.003 247.9); - --foreground: oklch(0.108 0.042 264.7); + --background: oklch(0.985 0 0); + --foreground: oklch(0.179 0.02 252.2); --surface: oklch(1 0 0); - --surface-foreground: oklch(0.108 0.042 264.7); - --surface-secondary: oklch(0.956 0.009 250.2); - --surface-secondary-foreground: oklch(0.108 0.042 264.7); - --surface-tertiary: oklch(0.956 0.009 250.2); - --surface-tertiary-foreground: oklch(0.108 0.042 264.7); + --surface-foreground: oklch(0.179 0.02 252.2); + --surface-secondary: oklch(0.962 0.011 252.1); + --surface-secondary-foreground: oklch(0.179 0.02 252.2); + --surface-tertiary: oklch(0.962 0.011 252.1); + --surface-tertiary-foreground: oklch(0.179 0.02 252.2); --overlay: oklch(1 0 0); - --overlay-foreground: oklch(0.108 0.042 264.7); - --muted: oklch(0.506 0.045 257.4); - --default: oklch(0.956 0.009 250.2); - --default-foreground: oklch(0.108 0.042 264.7); - --accent: oklch(0.108 0.042 264.7); + --overlay-foreground: oklch(0.179 0.02 252.2); + --muted: oklch(0.46 0.014 248.1); + --default: oklch(0.962 0.011 252.1); + --default-foreground: oklch(0.179 0.02 252.2); + --accent: oklch(0.179 0.02 252.2); --accent-foreground: oklch(1 0 0); --field-background: oklch(1 0 0); - --field-foreground: oklch(0.108 0.042 264.7); - --field-placeholder: oklch(0.506 0.045 257.4); - --field-border: oklch(0.108 0.042 264.7 / 10%); - --success: oklch(0.514 0.1 167.2); + --field-foreground: oklch(0.179 0.02 252.2); + --field-placeholder: oklch(0.46 0.014 248.1); + --field-border: oklch(0.179 0.02 252.2 / 10%); + --success: oklch(0.461 0.0903 168.6); --success-foreground: oklch(1 0 0); --warning: oklch(0.521 0.143 47.7); --warning-foreground: oklch(1 0 0); --danger: oklch(0.46 0.173 22.6); --danger-foreground: oklch(1 0 0); --segment: oklch(1 0 0); - --segment-foreground: oklch(0.108 0.042 264.7); - --border: oklch(0.108 0.042 264.7 / 10%); - --separator: oklch(0.108 0.042 264.7 / 10%); - --focus: oklch(0.638 0.167 276.1); - --link: oklch(0.108 0.042 264.7); - --fill: oklch(0.956 0.009 250.2); - --sidebar: oklch(0.948 0.01 251.8); - --sidebar-foreground: oklch(0.108 0.042 264.7); + --segment-foreground: oklch(0.179 0.02 252.2); + --border: oklch(0.179 0.02 252.2 / 10%); + --separator: oklch(0.179 0.02 252.2 / 10%); + --focus: oklch(0.607 0.09 271.7); + --link: oklch(0.179 0.02 252.2); + --fill: oklch(0.936 0.009 264.5); + --sidebar: oklch(0.936 0.009 264.5); + --sidebar-foreground: oklch(0.179 0.02 252.2); --sidebar-accent: oklch(0.832 0.085 281.4 / 30%); - --sidebar-accent-foreground: oklch(0.108 0.042 264.7); - --sidebar-border: oklch(0.108 0.042 264.7 / 10%); + --sidebar-accent-foreground: oklch(0.179 0.02 252.2); + --sidebar-border: oklch(0.179 0.02 252.2 / 10%); /* end of tokens/src/scheme.ts */ } @variant dark { /* tokens/src/scheme.ts, dark: --background=background --foreground=foreground --surface=card --surface-foreground=card-foreground --surface-secondary=secondary --surface-secondary-foreground=secondary-foreground --surface-tertiary=accent --surface-tertiary-foreground=accent-foreground --overlay=popover --overlay-foreground=popover-foreground --muted=muted-foreground --default=secondary --default-foreground=secondary-foreground --accent=primary --accent-foreground=primary-foreground --field-background=card --field-foreground=foreground --field-placeholder=muted-foreground --field-border=input --success=success --success-foreground=primary-foreground --warning=warning --warning-foreground=primary-foreground --danger=destructive --danger-foreground=primary-foreground --segment=card --segment-foreground=foreground --border=border --separator=border --focus=ring --link=foreground --fill=muted --sidebar=sidebar --sidebar-foreground=sidebar-foreground --sidebar-accent=sidebar-accent --sidebar-accent-foreground=sidebar-accent-foreground --sidebar-border=sidebar-border (bun run tokens:generate) */ - --background: oklch(0.182 0.017 252); - --foreground: oklch(0.956 0.004 252); - --surface: oklch(0.212 0.017 252); - --surface-foreground: oklch(0.956 0.004 252); - --surface-secondary: oklch(0.253 0.017 252); - --surface-secondary-foreground: oklch(0.956 0.004 252); - --surface-tertiary: oklch(0.28 0.016 252); - --surface-tertiary-foreground: oklch(0.956 0.004 252); - --overlay: oklch(0.212 0.017 252); - --overlay-foreground: oklch(0.956 0.004 252); - --muted: oklch(0.69 0.016 252); - --default: oklch(0.253 0.017 252); - --default-foreground: oklch(0.956 0.004 252); - --accent: oklch(0.956 0.004 252); - --accent-foreground: oklch(0.108 0.017 252); - --field-background: oklch(0.212 0.017 252); - --field-foreground: oklch(0.956 0.004 252); - --field-placeholder: oklch(0.69 0.016 252); - --field-border: oklch(0.956 0.004 252 / 12%); - --success: oklch(0.832 0.13 170.1); - --success-foreground: oklch(0.108 0.017 252); - --warning: oklch(0.828 0.189 84.4); - --warning-foreground: oklch(0.108 0.017 252); - --danger: oklch(0.792 0.121 16.4); - --danger-foreground: oklch(0.108 0.017 252); - --segment: oklch(0.212 0.017 252); - --segment-foreground: oklch(0.956 0.004 252); - --border: oklch(0.956 0.004 252 / 12%); - --separator: oklch(0.956 0.004 252 / 12%); - --focus: oklch(0.713 0.151 277.7); - --link: oklch(0.956 0.004 252); - --fill: oklch(0.253 0.017 252); - --sidebar: oklch(0.156 0.017 252); - --sidebar-foreground: oklch(0.956 0.004 252); + --background: oklch(0.179 0.02 252.2); + --foreground: oklch(0.962 0.011 252.1); + --surface: oklch(0.206 0.019 252.1); + --surface-foreground: oklch(0.962 0.011 252.1); + --surface-secondary: oklch(0.253 0.016 252.4); + --surface-secondary-foreground: oklch(0.962 0.011 252.1); + --surface-tertiary: oklch(0.33 0.015 252.3); + --surface-tertiary-foreground: oklch(0.962 0.011 252.1); + --overlay: oklch(0.206 0.019 252.1); + --overlay-foreground: oklch(0.962 0.011 252.1); + --muted: oklch(0.719 0.012 252.1); + --default: oklch(0.253 0.016 252.4); + --default-foreground: oklch(0.962 0.011 252.1); + --accent: oklch(0.962 0.011 252.1); + --accent-foreground: oklch(0.179 0.02 252.2); + --field-background: oklch(0.206 0.019 252.1); + --field-foreground: oklch(0.962 0.011 252.1); + --field-placeholder: oklch(0.719 0.012 252.1); + --field-border: oklch(0.962 0.011 252.1 / 12%); + --success: oklch(0.782 0.1307 173); + --success-foreground: oklch(0.179 0.02 252.2); + --warning: oklch(0.783 0.156 60.7); + --warning-foreground: oklch(0.179 0.02 252.2); + --danger: oklch(0.829 0.092 13.4); + --danger-foreground: oklch(0.179 0.02 252.2); + --segment: oklch(0.206 0.019 252.1); + --segment-foreground: oklch(0.962 0.011 252.1); + --border: oklch(0.962 0.011 252.1 / 12%); + --separator: oklch(0.962 0.011 252.1 / 12%); + --focus: oklch(0.607 0.09 271.7); + --link: oklch(0.962 0.011 252.1); + --fill: oklch(0.33 0.015 252.3); + --sidebar: oklch(0.113 0.011 251.8); + --sidebar-foreground: oklch(0.962 0.011 252.1); --sidebar-accent: oklch(0.832 0.085 281.4 / 12%); - --sidebar-accent-foreground: oklch(0.956 0.004 252); - --sidebar-border: oklch(0.956 0.004 252 / 12%); + --sidebar-accent-foreground: oklch(0.962 0.011 252.1); + --sidebar-border: oklch(0.962 0.011 252.1 / 12%); /* end of tokens/src/scheme.ts */ } } diff --git a/mobile/src/scheme.ts b/mobile/src/scheme.ts index 69e1a20777..fee02f58b1 100644 --- a/mobile/src/scheme.ts +++ b/mobile/src/scheme.ts @@ -3,76 +3,76 @@ /** OpenBot's color scheme, light and dark, in hex: React Native draws no `oklch()`. */ export const scheme = { light: { - background: "#f8fafb", - foreground: "#010313", + background: "#fafafa", + foreground: "#0b121a", card: "#ffffff", - "card-foreground": "#010313", + "card-foreground": "#0b121a", popover: "#ffffff", - "popover-foreground": "#010313", - primary: "#010313", + "popover-foreground": "#0b121a", + primary: "#0b121a", "primary-foreground": "#ffffff", - secondary: "#ecf1f6", - "secondary-foreground": "#010313", - muted: "#ecf1f6", - "muted-foreground": "#55667f", - accent: "#ecf1f6", - "accent-foreground": "#010313", + secondary: "#edf3fa", + "secondary-foreground": "#0b121a", + muted: "#e7eaf0", + "muted-foreground": "#525960", + accent: "#edf3fa", + "accent-foreground": "#0b121a", destructive: "#a31526", - success: "#12795b", + success: "#08684f", warning: "#a84900", - border: "#0103131a", - input: "#0103131a", - ring: "#727eef", + border: "#0b121a1a", + input: "#0b121a1a", + ring: "#6f7fb9", "chart-1": "#1949c5", "chart-2": "#cd7d04", "chart-3": "#049d7b", "chart-4": "#ba0135", "chart-5": "#7b65ef", "empty-pattern-color": "#9ea4f5", - sidebar: "#e9eef4", - "sidebar-foreground": "#010313", - "sidebar-primary": "#010313", + sidebar: "#e7eaf0", + "sidebar-foreground": "#0b121a", + "sidebar-primary": "#0b121a", "sidebar-primary-foreground": "#ffffff", "sidebar-accent": "#bec2ff4d", - "sidebar-accent-foreground": "#010313", - "sidebar-border": "#0103131a", - "sidebar-ring": "#727eef", + "sidebar-accent-foreground": "#0b121a", + "sidebar-border": "#0b121a1a", + "sidebar-ring": "#6f7fb9", }, dark: { - background: "#0d1319", - foreground: "#eef1f3", - card: "#131920", - "card-foreground": "#eef1f3", - popover: "#131920", - "popover-foreground": "#eef1f3", - primary: "#eef1f3", - "primary-foreground": "#020409", - secondary: "#1c232a", - "secondary-foreground": "#eef1f3", - muted: "#1c232a", - "muted-foreground": "#949ca5", - accent: "#232a31", - "accent-foreground": "#eef1f3", - destructive: "#ff9aa0", - success: "#5fe3bb", - warning: "#ffb900", - border: "#eef1f31f", - input: "#eef1f31f", - ring: "#8d97ff", + background: "#0b121a", + foreground: "#edf3fa", + card: "#111820", + "card-foreground": "#edf3fa", + popover: "#111820", + "popover-foreground": "#edf3fa", + primary: "#edf3fa", + "primary-foreground": "#0b121a", + secondary: "#1d232a", + "secondary-foreground": "#edf3fa", + muted: "#30363d", + "muted-foreground": "#9fa5ac", + accent: "#30363d", + "accent-foreground": "#edf3fa", + destructive: "#fdafb6", + success: "#45d3b0", + warning: "#ff9e40", + border: "#edf3fa1f", + input: "#edf3fa1f", + ring: "#6f7fb9", "chart-1": "#3a70ee", "chart-2": "#f79807", "chart-3": "#03f4c0", "chart-4": "#de3951", "chart-5": "#aaa4ff", "empty-pattern-color": "#bec2ff", - sidebar: "#070d14", - "sidebar-foreground": "#eef1f3", - "sidebar-primary": "#eef1f3", - "sidebar-primary-foreground": "#020409", + sidebar: "#030508", + "sidebar-foreground": "#edf3fa", + "sidebar-primary": "#edf3fa", + "sidebar-primary-foreground": "#0b121a", "sidebar-accent": "#bec2ff1f", - "sidebar-accent-foreground": "#eef1f3", - "sidebar-border": "#eef1f31f", - "sidebar-ring": "#8d97ff", + "sidebar-accent-foreground": "#edf3fa", + "sidebar-border": "#edf3fa1f", + "sidebar-ring": "#6f7fb9", }, } as const; diff --git a/tokens/src/scheme.ts b/tokens/src/scheme.ts index 53796c0e94..cb8d1b6b48 100644 --- a/tokens/src/scheme.ts +++ b/tokens/src/scheme.ts @@ -58,28 +58,31 @@ export type Token = keyof typeof MEANING; export type Palette = Record; /* - * Three surfaces, darkest to lightest, the way Linear draws them: the frame (the sidebar's tint, - * which the window edge shares), the panel the page sits in, and the white cards on it. Every gray - * is Tailwind's slate at the gray's own lightness. CopilotKit's lavender is kept for what it marks: - * the ring is its periwinkle, and the selected sidebar row is a lilac tint. + * Three surfaces, darkest to lightest: the frame (the sidebar's tint, which the window edge shares), + * the panel the page sits in, and the white cards on it. The values are the light mode of the + * Figma UI Kit's `Semantic` collection (2026-12-03): a neutral near-white panel, blue-gray fills on + * Tailwind slate's hues, and a near-black blue for text and the main action. Secondary and accent + * are one pale blue; muted is a step deeper and is the frame's tint too. CopilotKit's lavender is + * kept for what it marks: the ring is the kit's lavender, and the selected sidebar row is a lilac + * tint. */ const light: Palette = { - background: "oklch(0.983 0.003 247.9)", - foreground: "oklch(0.108 0.042 264.7)", + background: "oklch(0.985 0 0)", + foreground: "oklch(0.179 0.02 252.2)", card: "oklch(1 0 0)", - "card-foreground": "oklch(0.108 0.042 264.7)", + "card-foreground": "oklch(0.179 0.02 252.2)", popover: "oklch(1 0 0)", - "popover-foreground": "oklch(0.108 0.042 264.7)", - primary: "oklch(0.108 0.042 264.7)", + "popover-foreground": "oklch(0.179 0.02 252.2)", + primary: "oklch(0.179 0.02 252.2)", "primary-foreground": "oklch(1 0 0)", - secondary: "oklch(0.956 0.009 250.2)", - "secondary-foreground": "oklch(0.108 0.042 264.7)", - muted: "oklch(0.956 0.009 250.2)", - "muted-foreground": "oklch(0.506 0.045 257.4)", - accent: "oklch(0.956 0.009 250.2)", - "accent-foreground": "oklch(0.108 0.042 264.7)", + secondary: "oklch(0.962 0.011 252.1)", + "secondary-foreground": "oklch(0.179 0.02 252.2)", + muted: "oklch(0.936 0.009 264.5)", + "muted-foreground": "oklch(0.46 0.014 248.1)", + accent: "oklch(0.962 0.011 252.1)", + "accent-foreground": "oklch(0.179 0.02 252.2)", destructive: "oklch(0.46 0.173 22.6)", - success: "oklch(0.514 0.1 167.2)", + success: "oklch(0.461 0.0903 168.6)", warning: "oklch(0.521 0.143 47.7)", /* * Every line (`border`, `input`, `sidebar-border`) is the text color at one strength: 10% here, @@ -87,9 +90,9 @@ const light: Palette = { * lines in ChatGPT, Claude and Grok. A line is never the only cue of a control: a checkbox's or a * radio's edge is `muted-foreground` (docs/design-system.md). */ - border: "oklch(0.108 0.042 264.7 / 10%)", - input: "oklch(0.108 0.042 264.7 / 10%)", - ring: "oklch(0.638 0.167 276.1)", + border: "oklch(0.179 0.02 252.2 / 10%)", + input: "oklch(0.179 0.02 252.2 / 10%)", + ring: "oklch(0.607 0.09 271.7)", /* * The chart series are OpenBot's own hues: the brand blue, warning's amber, success's teal, * destructive's rose and the sidebar's violet. Each is clearly colourful and at least 3:1 against @@ -102,58 +105,62 @@ const light: Palette = { "chart-4": "oklch(0.5 0.2 18)", "chart-5": "oklch(0.6 0.2 286)", "empty-pattern-color": "oklch(0.746 0.117 279.9)", - sidebar: "oklch(0.948 0.01 251.8)", - "sidebar-foreground": "oklch(0.108 0.042 264.7)", - "sidebar-primary": "oklch(0.108 0.042 264.7)", + sidebar: "oklch(0.936 0.009 264.5)", + "sidebar-foreground": "oklch(0.179 0.02 252.2)", + "sidebar-primary": "oklch(0.179 0.02 252.2)", "sidebar-primary-foreground": "oklch(1 0 0)", "sidebar-accent": "oklch(0.832 0.085 281.4 / 30%)", - "sidebar-accent-foreground": "oklch(0.108 0.042 264.7)", - "sidebar-border": "oklch(0.108 0.042 264.7 / 10%)", - "sidebar-ring": "oklch(0.638 0.167 276.1)", + "sidebar-accent-foreground": "oklch(0.179 0.02 252.2)", + "sidebar-border": "oklch(0.179 0.02 252.2 / 10%)", + "sidebar-ring": "oklch(0.607 0.09 271.7)", }; /* - * The same three surfaces on a near-black blue-gray ground: the frame darkest, the cards lightest. - * The grays are slate with its hue moved from 265 to 252 and 40% of its tint: slate's own dark - * leans indigo, which reads as purple. - * Secondary and muted fills are lighter than the cards, as shadcn's dark fills are, so a button or - * badge never reads as a hole. + * The same three surfaces on a near-black blue-gray ground, from the dark mode of the same + * `Semantic` collection: the frame darkest, the cards lightest. Every gray sits on one hue, 252, + * with a faint tint: slate's own dark leans indigo, which reads as purple. + * The fills are lighter than the cards, as shadcn's dark fills are, so a button or badge never + * reads as a hole: secondary a step above the card, muted and accent a step above that. */ const dark: Palette = { - background: "oklch(0.182 0.017 252)", - foreground: "oklch(0.956 0.004 252)", - card: "oklch(0.212 0.017 252)", - "card-foreground": "oklch(0.956 0.004 252)", - popover: "oklch(0.212 0.017 252)", - "popover-foreground": "oklch(0.956 0.004 252)", - primary: "oklch(0.956 0.004 252)", - "primary-foreground": "oklch(0.108 0.017 252)", - secondary: "oklch(0.253 0.017 252)", - "secondary-foreground": "oklch(0.956 0.004 252)", - muted: "oklch(0.253 0.017 252)", - "muted-foreground": "oklch(0.69 0.016 252)", - accent: "oklch(0.28 0.016 252)", - "accent-foreground": "oklch(0.956 0.004 252)", - destructive: "oklch(0.792 0.121 16.4)", - success: "oklch(0.832 0.13 170.1)", - warning: "oklch(0.828 0.189 84.4)", - border: "oklch(0.956 0.004 252 / 12%)", - input: "oklch(0.956 0.004 252 / 12%)", - ring: "oklch(0.713 0.151 277.7)", + background: "oklch(0.179 0.02 252.2)", + foreground: "oklch(0.962 0.011 252.1)", + card: "oklch(0.206 0.019 252.1)", + "card-foreground": "oklch(0.962 0.011 252.1)", + popover: "oklch(0.206 0.019 252.1)", + "popover-foreground": "oklch(0.962 0.011 252.1)", + primary: "oklch(0.962 0.011 252.1)", + "primary-foreground": "oklch(0.179 0.02 252.2)", + secondary: "oklch(0.253 0.016 252.4)", + "secondary-foreground": "oklch(0.962 0.011 252.1)", + muted: "oklch(0.33 0.015 252.3)", + "muted-foreground": "oklch(0.719 0.012 252.1)", + accent: "oklch(0.33 0.015 252.3)", + "accent-foreground": "oklch(0.962 0.011 252.1)", + /* + * The kit's destructive (#f6a8af) at its hue and chroma, a shade lighter: its words on a + * `destructive/20` hover over a muted row read at 4.5:1, where the kit's own reach 4.29:1. + */ + destructive: "oklch(0.829 0.092 13.4)", + success: "oklch(0.782 0.1307 173)", + warning: "oklch(0.783 0.156 60.7)", + border: "oklch(0.962 0.011 252.1 / 12%)", + input: "oklch(0.962 0.011 252.1 / 12%)", + ring: "oklch(0.607 0.09 271.7)", "chart-1": "oklch(0.58 0.2 264)", "chart-2": "oklch(0.76 0.168 66)", "chart-3": "oklch(0.86 0.17 170)", "chart-4": "oklch(0.6 0.2 18)", "chart-5": "oklch(0.76 0.128 286)", "empty-pattern-color": "oklch(0.832 0.085 281.4)", - sidebar: "oklch(0.156 0.017 252)", - "sidebar-foreground": "oklch(0.956 0.004 252)", - "sidebar-primary": "oklch(0.956 0.004 252)", - "sidebar-primary-foreground": "oklch(0.108 0.017 252)", + sidebar: "oklch(0.113 0.011 251.8)", + "sidebar-foreground": "oklch(0.962 0.011 252.1)", + "sidebar-primary": "oklch(0.962 0.011 252.1)", + "sidebar-primary-foreground": "oklch(0.179 0.02 252.2)", "sidebar-accent": "oklch(0.832 0.085 281.4 / 12%)", - "sidebar-accent-foreground": "oklch(0.956 0.004 252)", - "sidebar-border": "oklch(0.956 0.004 252 / 12%)", - "sidebar-ring": "oklch(0.713 0.151 277.7)", + "sidebar-accent-foreground": "oklch(0.962 0.011 252.1)", + "sidebar-border": "oklch(0.962 0.011 252.1 / 12%)", + "sidebar-ring": "oklch(0.607 0.09 271.7)", }; export const scheme = { light, dark } as const; diff --git a/tokens/tests/generated.test.ts b/tokens/tests/generated.test.ts index 85c4a86e2a..add7f1afb3 100644 --- a/tokens/tests/generated.test.ts +++ b/tokens/tests/generated.test.ts @@ -62,7 +62,7 @@ describe("OpenBot Mobile's copy", () => { expect(drawn).toBe(oklchToHex(token as string)); } expect(phone.light.warning).toBe("#a84900"); - expect(phone.dark.warning).toBe("#ffb900"); + expect(phone.dark.warning).toBe("#ff9e40"); }); }); From bdce59e6332a169cb8b7d420369a77b8975fdfa7 Mon Sep 17 00:00:00 2001 From: Raman Yasel Date: Fri, 4 Dec 2026 11:18:54 +0300 Subject: [PATCH 2/3] Colors: warning/25 in light, and in-progress as a fourth status 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 --- app/src/lib/artifacts/bridge/wire.ts | 1 + app/src/lib/artifacts/tokens.css | 4 +++- app/src/theme.css | 5 +++- app/tests/design-tokens.test.ts | 5 ++-- docs/app-guidelines.md | 9 +++---- docs/design-system.md | 4 ++-- mobile/global.css | 2 +- mobile/src/scheme.ts | 4 +++- tokens/src/scheme.ts | 14 ++++++++--- tokens/tests/contrast.test.ts | 35 ++++++++++++++++++++++++---- tokens/tests/generated.test.ts | 2 +- 11 files changed, 64 insertions(+), 21 deletions(-) diff --git a/app/src/lib/artifacts/bridge/wire.ts b/app/src/lib/artifacts/bridge/wire.ts index e81e135d82..e1a8f61f8c 100644 --- a/app/src/lib/artifacts/bridge/wire.ts +++ b/app/src/lib/artifacts/bridge/wire.ts @@ -35,6 +35,7 @@ export const THEME_TOKENS = [ "destructive", "success", "warning", + "in-progress", "border", "input", "ring", diff --git a/app/src/lib/artifacts/tokens.css b/app/src/lib/artifacts/tokens.css index 7e317803cb..cf829a9751 100644 --- a/app/src/lib/artifacts/tokens.css +++ b/app/src/lib/artifacts/tokens.css @@ -18,7 +18,8 @@ --accent-foreground: oklch(0.179 0.02 252.2); --destructive: oklch(0.46 0.173 22.6); --success: oklch(0.461 0.0903 168.6); - --warning: oklch(0.521 0.143 47.7); + --warning: oklch(0.492 0.143 44); + --in-progress: oklch(0.448 0.189 261.7); --border: oklch(0.179 0.02 252.2 / 10%); --input: oklch(0.179 0.02 252.2 / 10%); --ring: oklch(0.607 0.09 271.7); @@ -58,6 +59,7 @@ --destructive: oklch(0.829 0.092 13.4); --success: oklch(0.782 0.1307 173); --warning: oklch(0.783 0.156 60.7); + --in-progress: oklch(0.821 0.089 262.1); --border: oklch(0.962 0.011 252.1 / 12%); --input: oklch(0.962 0.011 252.1 / 12%); --ring: oklch(0.607 0.09 271.7); diff --git a/app/src/theme.css b/app/src/theme.css index 4d6c01dc1e..e38f2eea59 100644 --- a/app/src/theme.css +++ b/app/src/theme.css @@ -30,7 +30,8 @@ --accent-foreground: oklch(0.179 0.02 252.2); --destructive: oklch(0.46 0.173 22.6); --success: oklch(0.461 0.0903 168.6); - --warning: oklch(0.521 0.143 47.7); + --warning: oklch(0.492 0.143 44); + --in-progress: oklch(0.448 0.189 261.7); --border: oklch(0.179 0.02 252.2 / 10%); --input: oklch(0.179 0.02 252.2 / 10%); --ring: oklch(0.607 0.09 271.7); @@ -84,6 +85,7 @@ --destructive: oklch(0.829 0.092 13.4); --success: oklch(0.782 0.1307 173); --warning: oklch(0.783 0.156 60.7); + --in-progress: oklch(0.821 0.089 262.1); --border: oklch(0.962 0.011 252.1 / 12%); --input: oklch(0.962 0.011 252.1 / 12%); --ring: oklch(0.607 0.09 271.7); @@ -176,6 +178,7 @@ body { --color-destructive: var(--destructive); --color-success: var(--success); --color-warning: var(--warning); + --color-in-progress: var(--in-progress); --color-accent-foreground: var(--accent-foreground); --color-accent: var(--accent); --color-muted-foreground: var(--muted-foreground); diff --git a/app/tests/design-tokens.test.ts b/app/tests/design-tokens.test.ts index 92188c903a..5e75ed022e 100644 --- a/app/tests/design-tokens.test.ts +++ b/app/tests/design-tokens.test.ts @@ -79,14 +79,15 @@ describe("default look tokens", () => { }, ); - // A stock shadcn theme drops in: no token beyond shadcn's own, the success and warning colors and the - // empty-state pattern's. + // A stock shadcn theme drops in: no token beyond shadcn's own, the success, warning and + // in-progress colors and the empty-state pattern's. test.each(THEMES)("%s: declares only shadcn's tokens", (_, tokens) => { const extra = [...tokens.keys()].filter( (token) => !SHADCN_TOKEN.test(token) && token !== "--success" && token !== "--warning" && + token !== "--in-progress" && !token.startsWith("--empty-pattern"), ); expect(extra).toEqual([]); diff --git a/docs/app-guidelines.md b/docs/app-guidelines.md index 2ce7518593..44d113c8a5 100644 --- a/docs/app-guidelines.md +++ b/docs/app-guidelines.md @@ -17,8 +17,8 @@ one of the rules below is not merged. The scheme is the set of tokens in [`tokens/src/scheme.ts`](../tokens/src/scheme.ts), each with a light and a dark value and what it means: `background`, `foreground`, `card`, `popover`, `primary`, -`secondary`, `muted`, `accent`, `destructive`, `success`, `warning`, `border`, `input` and `ring`, -and the chart and sidebar sets. +`secondary`, `muted`, `accent`, `destructive`, `success`, `warning`, `in-progress`, `border`, +`input` and `ring`, and the chart and sidebar sets. The grays are quiet blue-grays, the neutrals of the design's UI kit. In light each sits on one of Tailwind slate's hues with a fainter tint, and the panel is a near-white with none; in dark every @@ -33,8 +33,9 @@ CopilotKit's lavender marks only what it means: the `ring`, the selected sidebar colored to decorate it or to make it stand out. - **A color means one thing.** `destructive` is for what deletes or what failed. `success` is for what worked, or is working. `warning` is for what needs the person: something waits on them, or - may not go as they expect. `ring` is for focus. If none of those is what you mean, the answer is - no color. + may not go as they expect. `in-progress` is for what is under way and has no outcome yet: a run, + a task or a step that hasn't finished. `ring` is for focus. If none of those is what you mean, + the answer is no color. - **The token has the dark value.** Write the class once. No `dark:` override of a color. - **Light and dark, both.** A token carries both values, so a screen drawn with tokens has both. Check both before you ask for a review. diff --git a/docs/design-system.md b/docs/design-system.md index 08ae60b509..fc5b335768 100644 --- a/docs/design-system.md +++ b/docs/design-system.md @@ -90,8 +90,8 @@ The colors and the rules for using them are in changed in `tokens/src/scheme.ts` and written out with `bun run tokens:generate`. On top of that: - **The token set is shadcn's.** The color pairs, the chart and sidebar sets and `--radius`, plus - our `success` and `warning`. A new token needs agreeing first, a light and a dark value, and one - meaning. + our `success`, `warning` and `in-progress`. A new token needs agreeing first, a light and a dark + value, and one meaning. - **No token for a component or for a state.** Not `--color-primary-hover`, not `--spacing-menu-item-x`, not `--radius-card`. A stock shadcn theme doesn't set them, so they stay at our values while everything else changes, and the theme is broken. A state is made from the diff --git a/mobile/global.css b/mobile/global.css index 4d7cc8dc2c..111dd732c2 100644 --- a/mobile/global.css +++ b/mobile/global.css @@ -54,7 +54,7 @@ --field-border: oklch(0.179 0.02 252.2 / 10%); --success: oklch(0.461 0.0903 168.6); --success-foreground: oklch(1 0 0); - --warning: oklch(0.521 0.143 47.7); + --warning: oklch(0.492 0.143 44); --warning-foreground: oklch(1 0 0); --danger: oklch(0.46 0.173 22.6); --danger-foreground: oklch(1 0 0); diff --git a/mobile/src/scheme.ts b/mobile/src/scheme.ts index fee02f58b1..1cab6e1e55 100644 --- a/mobile/src/scheme.ts +++ b/mobile/src/scheme.ts @@ -19,7 +19,8 @@ export const scheme = { "accent-foreground": "#0b121a", destructive: "#a31526", success: "#08684f", - warning: "#a84900", + warning: "#a03e00", + "in-progress": "#0b49bb", border: "#0b121a1a", input: "#0b121a1a", ring: "#6f7fb9", @@ -56,6 +57,7 @@ export const scheme = { destructive: "#fdafb6", success: "#45d3b0", warning: "#ff9e40", + "in-progress": "#a5c5ff", border: "#edf3fa1f", input: "#edf3fa1f", ring: "#6f7fb9", diff --git a/tokens/src/scheme.ts b/tokens/src/scheme.ts index cb8d1b6b48..198db1bb1b 100644 --- a/tokens/src/scheme.ts +++ b/tokens/src/scheme.ts @@ -6,8 +6,8 @@ * here, never in a copy. A new color is a change to the scheme: agree it first, then add it here * with a light and a dark value (docs/app-guidelines.md). * - * The names are shadcn's, so a stock shadcn theme drops in, plus `success`, `warning` and the - * empty-state pattern's color. + * The names are shadcn's, so a stock shadcn theme drops in, plus `success`, `warning`, + * `in-progress` and the empty-state pattern's color. * * A color is never renamed or removed. A customer's theme (brand.yaml's `skin.stylesheet`) sets * these names, and a theme that sets one the scheme no longer has would quietly stop working. Change @@ -34,6 +34,8 @@ export const MEANING = { success: "What worked, or is working.", warning: "What needs the person: something waits on them, or may not go as they expect. Never decoration.", + "in-progress": + "What is under way and has no outcome yet: a run, a task or a step that hasn't finished.", border: "Lines between things.", input: "A field's border.", ring: "Focus.", @@ -83,7 +85,12 @@ const light: Palette = { "accent-foreground": "oklch(0.179 0.02 252.2)", destructive: "oklch(0.46 0.173 22.6)", success: "oklch(0.461 0.0903 168.6)", - warning: "oklch(0.521 0.143 47.7)", + /* + * The kit's warning/25, a step deeper than its warning (warning/30, #a84900): a badge draws its + * words in the status color on its 10% tint, and #a84900 reads at 4.20:1 there over a muted row. + */ + warning: "oklch(0.492 0.143 44)", + "in-progress": "oklch(0.448 0.189 261.7)", /* * Every line (`border`, `input`, `sidebar-border`) is the text color at one strength: 10% here, * 12% in dark. That is about 1.25:1 against a card in light and 1.38:1 in dark, as light as the @@ -144,6 +151,7 @@ const dark: Palette = { destructive: "oklch(0.829 0.092 13.4)", success: "oklch(0.782 0.1307 173)", warning: "oklch(0.783 0.156 60.7)", + "in-progress": "oklch(0.821 0.089 262.1)", border: "oklch(0.962 0.011 252.1 / 12%)", input: "oklch(0.962 0.011 252.1 / 12%)", ring: "oklch(0.607 0.09 271.7)", diff --git a/tokens/tests/contrast.test.ts b/tokens/tests/contrast.test.ts index 6257a273fe..7281867e44 100644 --- a/tokens/tests/contrast.test.ts +++ b/tokens/tests/contrast.test.ts @@ -9,15 +9,18 @@ import { type Mode, scheme, type Token } from "../src/scheme"; * second token for "the same color, as text". * * WCAG 2's relative luminance and contrast ratio (tokens/src/color.ts), on the scheme's sRGB - * values. A translucent color (the selected sidebar row's tint) is laid over the surface it sits - * on first. + * values. A translucent color (the selected sidebar row's tint, a badge's `success/10`) is laid + * over the surface it sits on first. */ const TEXT = 4.5; const NON_TEXT = 3; +/** A surface: a token, or a token at an opacity as Tailwind writes it (`destructive/10`). */ +type Layer = Token | `${Token}/${number}`; + /** [what is read, the surfaces it is read on (a translucent one over the one after it), minimum] */ -const PAIRS: [Token, Token[], number][] = [ +const PAIRS: [Token, Layer[], number][] = [ ["foreground", ["background"], TEXT], ["card-foreground", ["card"], TEXT], ["popover-foreground", ["popover"], TEXT], @@ -33,16 +36,38 @@ const PAIRS: [Token, Token[], number][] = [ ["success", ["card"], TEXT], ["warning", ["background"], TEXT], ["warning", ["card"], TEXT], + ["in-progress", ["background"], TEXT], + ["in-progress", ["card"], TEXT], ["sidebar-foreground", ["sidebar"], TEXT], ["sidebar-primary-foreground", ["sidebar-primary"], TEXT], ["sidebar-accent-foreground", ["sidebar-accent", "sidebar"], TEXT], + // A status badge's words, in the status's color on its 10% tint, wherever a badge stands: the + // page, a card, a menu, a muted row, the sidebar. + ...(["background", "card", "popover", "muted", "sidebar"] as const).flatMap( + (ground): [Token, Layer[], number][] => + (["success", "warning", "destructive", "in-progress"] as const).map( + (tone): [Token, Layer[], number] => [ + tone, + [`${tone}/10`, ground], + TEXT, + ], + ), + ), ["ring", ["background"], NON_TEXT], ["ring", ["card"], NON_TEXT], ["sidebar-ring", ["sidebar"], NON_TEXT], ]; -function surface(mode: Mode, layers: Token[]): Rgb { - const colors = layers.map((token) => oklchToRgb(scheme[mode][token])); +function color(mode: Mode, layer: Layer): Rgb { + const [token, percent] = layer.split("/") as [Token, string | undefined]; + const rgb = oklchToRgb(scheme[mode][token]); + return percent === undefined + ? rgb + : { ...rgb, alpha: (rgb.alpha * Number(percent)) / 100 }; +} + +function surface(mode: Mode, layers: Layer[]): Rgb { + const colors = layers.map((layer) => color(mode, layer)); return colors.reduceRight((under, top) => over(top, under)); } diff --git a/tokens/tests/generated.test.ts b/tokens/tests/generated.test.ts index add7f1afb3..dbd45ca5d9 100644 --- a/tokens/tests/generated.test.ts +++ b/tokens/tests/generated.test.ts @@ -61,7 +61,7 @@ describe("OpenBot Mobile's copy", () => { const drawn: string = phone[mode].warning; expect(drawn).toBe(oklchToHex(token as string)); } - expect(phone.light.warning).toBe("#a84900"); + expect(phone.light.warning).toBe("#a03e00"); expect(phone.dark.warning).toBe("#ff9e40"); }); }); From 7535535663b7b6b49b8ed8bc01d1b2716d3b549e Mon Sep 17 00:00:00 2001 From: Raman Yasel Date: Fri, 4 Dec 2026 11:34:27 +0300 Subject: [PATCH 3/3] Contrast: a status chip's words on its 12% hover tint 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 --- tokens/tests/contrast.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tokens/tests/contrast.test.ts b/tokens/tests/contrast.test.ts index 7281867e44..d0166b4455 100644 --- a/tokens/tests/contrast.test.ts +++ b/tokens/tests/contrast.test.ts @@ -41,15 +41,15 @@ const PAIRS: [Token, Layer[], number][] = [ ["sidebar-foreground", ["sidebar"], TEXT], ["sidebar-primary-foreground", ["sidebar-primary"], TEXT], ["sidebar-accent-foreground", ["sidebar-accent", "sidebar"], TEXT], - // A status badge's words, in the status's color on its 10% tint, wherever a badge stands: the - // page, a card, a menu, a muted row, the sidebar. + // A status badge's words, in the status's color on its 10% tint, and on the 12% a badge drawn as + // a chip (a link or a button) deepens to under the pointer, wherever a badge stands: the page, a + // card, a menu, a muted row, the sidebar. ...(["background", "card", "popover", "muted", "sidebar"] as const).flatMap( (ground): [Token, Layer[], number][] => - (["success", "warning", "destructive", "in-progress"] as const).map( - (tone): [Token, Layer[], number] => [ - tone, - [`${tone}/10`, ground], - TEXT, + (["success", "warning", "destructive", "in-progress"] as const).flatMap( + (tone): [Token, Layer[], number][] => [ + [tone, [`${tone}/10`, ground], TEXT], + [tone, [`${tone}/12`, ground], TEXT], ], ), ),