refactor(design): migrate hardcoded colors to kami tokens
Purge remaining hardcoded color values from the component layer and main
process so every surface flows through the kami token system.
src/main/desktop-shell-window.ts
- BrowserWindow.backgroundColor no longer paints pure white before the
renderer mounts. It now picks kami parchment (#F5F4ED) or deep-dark
(#141413) based on nativeTheme.shouldUseDarkColors so the startup
flash respects the user's OS theme preference.
src/shared/constants.ts
- DEPARTMENT_COLORS collapses 12 unrelated hex brand colors (violet,
red, green, cyan, pink, ...) into six kami tokens: var(--primary),
var(--kami-ink), var(--kami-dark-warm), var(--kami-charcoal),
var(--kami-olive), var(--kami-stone). Departments are distinguished
by warm-neutral ramp + ink-blue, never by second chromatic hue.
src/renderer/components/communication/{MessageItem,SearchResults}.tsx
- Replace the string-concat tint pattern `${color}18` with
color-mix(in oklab, ${color}, transparent 91%). The old pattern
produced invalid CSS (e.g. `var(--primary)18`) whenever `color`
was a CSS custom property, silently falling back to no background.
color-mix works for both hex and var() inputs, eliminating the
latent bug at the source.
src/renderer/components/ui/ActionButton.tsx
- Replace hand-rolled rgba(74,93,122,0.35) and rgba(220,53,69,0.3)
drop shadows with kami ring shadows routed through color-mix over
var(--primary) and var(--destructive).
src/renderer/views/CommandPaletteView.tsx
- Replace rgba(15,23,42,0.08) cold-slate shadow with a kami whisper
shadow driven by color-mix over var(--foreground).
src/renderer/components/skills/SkillAgentToggles.tsx
src/renderer/components/execution/ModelManagementShared.tsx
- Toggle thumbs switch from bg-white to bg-background so they
inherit parchment in light mode and deep-dark in dark mode,
removing the last pure-white surfaces from the renderer.
Third-party brand hex values in src/renderer/components/social/
social-config.ts are retained: they represent external brand identity
(Twitter blue, YouTube red, ...), not kami chrome, and collapsing them
to one hue would destroy recognition.
Typecheck clean. No business-logic signatures changed.
This commit is contained in:
1 parent
5113abacc7
commit
95c4b0ae48
8 files changed
+21
-20
No files matched your search
+12
-12
@@ -21,16 +21,16 @@ export const DEPARTMENT_OPTIONS: Array<{ value: DepartmentId | ""; label: string
|
||||
];
|
||||
|
||||
export const DEPARTMENT_COLORS: Record<DepartmentId, string> = {
|
||||
executive: "#8b5cf6",
|
||||
engineering: "#3b82f6",
|
||||
product: "#f59e0b",
|
||||
marketing: "#ec4899",
|
||||
sales: "#10b981",
|
||||
hr: "#6366f1",
|
||||
finance: "#14b8a6",
|
||||
legal: "#a78bfa",
|
||||
operations: "#f97316",
|
||||
customer_support: "#06b6d4",
|
||||
research: "#0ea5e9",
|
||||
design: "#f43f5e",
|
||||
executive: "var(--primary)",
|
||||
engineering: "var(--kami-ink)",
|
||||
product: "var(--kami-dark-warm)",
|
||||
marketing: "var(--kami-olive)",
|
||||
sales: "var(--kami-olive)",
|
||||
hr: "var(--kami-charcoal)",
|
||||
finance: "var(--kami-charcoal)",
|
||||
legal: "var(--kami-stone)",
|
||||
operations: "var(--kami-dark-warm)",
|
||||
customer_support: "var(--kami-stone)",
|
||||
research: "var(--kami-ink)",
|
||||
design: "var(--primary)",
|
||||
};
|
||||
Reference in new issue
Block a user