Advisor AI Agent — Design System Token Migration

Before / after report · advisor-ai-agent.html now reads from Advisor DS 2.0 via ds-tokens.css

57
colours tokenised
7
exact DS match
30
snapped to DS
20
extended (pending DS)
182
total usages
How it now works: a new ds-tokens.css holds the DS 2.0 variables (mirrored from packages/tokens + src/index.css). The prototype links it, the inline tailwind.config maps every named utility to those variables, and hard-coded hex in the <style> block became var(--token). JS chart colours resolve to literal DS hex (so SVG strokes still render). Edit a value in ds-tokens.css → the whole prototype re-themes. The untouched original is saved as advisor-ai-agent.original.html.

1 · Exact DS matches no visual change7 colours

The prototype was already built on Alpheya values — these were identical to DS 2.0 and only got centralised into tokens.

BeforeAfter (DS token)Uses
#1f2123#1f2123--foreground61
#f2f6f9#f2f6f9--muted15
#687178#687178--secondary-foreground4
#08d2ae#08d2ae--teal2
#e9edf1#e9edf1--accent1
#ffffff#ffffff--background1
#e6eaee#e6eaee--border1

2 · Snapped to DS minor visual shift30 colours

Off-token greys, pale surfaces and semantic status colours were realigned to the nearest DS 2.0 token. Each shift is small and moves the prototype onto the system.

BeforeAfter (DS token)Uses
#fff#ffffff--background18
#c5cbd3#dee3e7--input8
#d4d7da#dee3e7--input5
#fafbfc#f2f6f9--muted3
#0a6c8f#193cb8--info-foreground3
#cdd2d8#dee3e7--input2
#34d399#00a63e--success-solid2
#f7f9fb#f2f6f9--muted2
#eef1f4#e9edf1--accent2
#e3f1f8rgba(43,127,255,0.2)--info2
#9ea5ac#687178--muted-foreground2
#e6f4ecrgba(0,166,62,0.2)--success2
#0a7c4a#016630--success-foreground2
#fbf2dcrgba(255,210,48,0.2)--warning2
#6b5b3a#8d7e3f--chart151
#a59169#cbbf8b--chart71
#fe9a00#ffd230--warning-solid1
#e9eef4#e9edf1--accent1
#eef1f6#e9edf1--accent1
#e7f3efrgba(0,166,62,0.2)--success1
#f1ecfb#f3e8ff--badge-purple1
#f5f7f9#f2f6f9--muted1
#5f6870#687178--secondary-foreground1
#f6f8fb#f2f6f9--muted1
#9a6b00#7b3306--warning-foreground1
#cbd2da#dee3e7--input1
#16a34a#00a63e--success-solid1
#d99a06#ffd230--warning-solid1
#e5484d#d2031b--destructive1
#7a5500#7b3306--warning-foreground1

3 · Components affected where the shifts land

The snapped colours above, mapped to the prototype’s UI. The DS component library (packages/ui-desktop) was not modified — only this standalone prototype was retokenised.

notable shiftmoderatesubtlepreserved

Inputs & controls

Composer / search fieldfocus border #d4d7da--input
Radio / checkboxborder #cdd2d8--input
Buttons · starter chips · tileshover border #c5cbd3--input

Badges & status

Risk indicator (Conservative / Balanced / Aggressive)#16a34a / #d99a06 / #e5484d → DS success-solid / warning-solid / destructive
Account-type badge “Robo”#f1ecfb--badge-purple
Verdict badges (core / secondary)→ DS success / warning tints
Workflow status dot “In progress”#fe9a00--warning-solid (orange → DS yellow)

Cards

Insight / nudge cards (Opportunity · Needs review · Market)fg + bg → DS success / warning / info tints (deepen to .2 alpha)
All cardsrounded-lg 12px → 10px — corners tighten 2px

AI chrome & voice

Mic active + equaliser bars#0a6c8f / #e3f1f8 → DS info-foreground / info (teal-blue → indigo)
Success check + presence dot#34d399--success-solid (mint → DS green)
AI response secondary text · typing dots · date-picker labels#9ea5ac--muted-foregrounddarker; the real DS fix (better contrast)
History-rail toggle / recent-item active#eef1f4--accent

Preserved on purpose

Asset-allocation donut & barscategory palette kept exactly — no visual change
Ask-AI aurora / liquid-glass buttonsbespoke effect — excluded from tokenisation

4 · Extended — category / data palette value preserved20 colours

A muted categorical palette (asset-class hues, avatar tints) with no DS 2.0 equivalent. Tokenised as --cat* with their original values — look unchanged, and now flagged for the DS team to fold into an official data-viz ramp.

BeforeTokenised asUses
#2b3a67#2b3a67--cat42
#0a6c54#0a6c54--cat62
#5b3aa0#5b3aa0--cat22
#5f9e92#5f9e92--cat52
#6b82c4#6b82c4--cat32
#a08bc4#a08bc4--cat12
#1f3a5f#1f3a5f--cat151
#3a6ea5#3a6ea5--cat141
#1f4f3a#1f4f3a--cat181
#3a8568#3a8568--cat161
#4f1f3a#4f1f3a--cat91
#853a6e#853a6e--cat81
#2f6a5e#2f6a5e--cat171
#495da0#495da0--cat131
#6f5a9a#6f5a9a--cat71
#9aa9d8#9aa9d8--cat121
#8fbcb2#8fbcb2--cat191
#e0c184#e0c184--cat201
#a894c9#a894c9--cat101
#c1b0da#c1b0da--cat111

5 · Config, radius, shadow & type structural

ItemBeforeAfterWhy
Config token: muted-foreground#9ea5ac#687178Real DS mismatch — DS --secondary/muted-foreground is #687178 (neutral-secondary), not #9ea5ac. Darkens muted text ~1 step (improves contrast).
Config colorshard-coded hexvar(--token)All tailwind.config colours now reference ds-tokens.css variables instead of literal hex — single source of truth.
Radius: rounded-lg12px10pxSnapped to DS --radius: 10px (Figma radius/rounded-button). Card corners tighten 2px.
Radius: rounded-sm4px6pxDS scale calc(--radius − 4px).
Shadowsad-hoc--shadow-2xs / sm / mdMapped to DS elevation tokens (node 6735:24752).
FontsInter · Noto Sans Arabic · JetBrains MonounchangedAlready match DS (Inter sans / JetBrains mono); Noto Arabic kept for RTL.

6 · Alpha channels

Ink & aqua opacity layers now derive from the token channel vars instead of hard-coded RGB.

PatternNowUses
rgba(31,33,35, α)rgb(var(--foreground-rgb) / α)28
rgba(8,210,174, α)rgb(var(--teal-rgb) / α)2

7 · Deliberately excluded left as-is

Bespoke decorative treatments (the “Ask AI” aurora / liquid-glass buttons) and functional black used for luminance masks — no DS token applies, so they stay literal to preserve the effect.

ColourKept because
#000Luminance mask / scrim (functional, not a brand colour)
#000000Shadow / scrim base (functional)
#0b6b5bGlass button icon teal
#151618Ask-AI “aurora” gradient stop
#17181aAsk-AI aurora base / icon tile
#202327Ask-AI aurora hover
#20313a“Liquid glass” button text
#3a4147Ask-AI aurora mid-gradient
Generated for the Alpheya Advisor AI Agent exploration · DS 2.0 (Dionysus) · Figma file qgHWlJCc8tS7BjWxoFajmm. Swatches render the actual values; “snapped” rows compare the prototype’s old hex to the DS token value.