Skip to content

Commit 2bb5bdf

Browse files
committed
fix(webapp): mirror the agent logo's mono ramp on light instead of just darkening it
Each monoLight stop is now the cool grey whose contrast against a white panel matches that stop's contrast against a dark one, so the ramp keeps mono's shape: the middle stop stays the extreme the head glows with and the third stays the dim tail. With mode="light" handling the ghost grid and the opacity pair untouched, the light logo is a mirror of the dark one rather than a different-looking icon.
1 parent 2e825fd commit 2bb5bdf

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

apps/webapp/app/components/primitives/AgentDotMatrix.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,16 @@ export type DotMatrixPalette = {
118118

119119
export const DOT_MATRIX_PALETTES = {
120120
mono: { stops: ["#e2e8f0", "#ffffff", "#94a3b8"], glow: "#ffffff" },
121-
/** `mono` inverted, for light surfaces — the white ramp vanishes on white. */
122-
monoLight: { stops: ["#0d0e12", "#1a1b1f", "#3b3e45"], glow: "#1a1b1f" },
121+
/**
122+
* `mono` mirrored for light surfaces — the white ramp vanishes on white.
123+
*
124+
* Not just "dark ink": each stop is the cool grey whose contrast ratio against
125+
* a white panel equals that stop's ratio against a dark one (14.0 / 17.2 / 6.7),
126+
* so the ramp keeps mono's shape — the middle stop is still the extreme the
127+
* head glows with, the third still the dim tail. The peak lands on
128+
* charcoal-800, which is the light theme's own brightest text ink.
129+
*/
130+
monoLight: { stops: ["#2b2c2f", "#1a1b1f", "#585c64"], glow: "#1a1b1f" },
123131
trigger: { stops: ["#41ff54", "#a4ff53", "#e7ff52"], glow: "#86ff53" },
124132
aurora: { stops: ["#ff3cac", "#784ba0", "#2b86c5"], glow: "#9c64bf" },
125133
ocean: { stops: ["#00c6ff", "#0072ff", "#4facfe"], glow: "#2f8fff" },
@@ -643,6 +651,12 @@ export function AgentDotMatrix({
643651
* white-based, so on the light theme it would be white ink on a white panel.
644652
* The matrix draws on canvas and can't read a CSS variable, so the ink is
645653
* picked from the active theme here.
654+
*
655+
* The light theme is a MIRROR of the dark one, not a different look: `mode`
656+
* flips the ghost grid to black ink (and nudges the dots up 15%, since dark ink
657+
* reads optically smaller), `monoLight` mirrors the ramp's contrast ratios
658+
* against white, and the `opacityBase`/`opacityPeak` pair is untouched — so rest
659+
* dots, head and ghost grid keep exactly the relationships they have on dark.
646660
*/
647661
export function AgentMonoLogo(props: Omit<AgentDotMatrixProps, "palette" | "restColor" | "mode">) {
648662
const mode = useThemeMode();

0 commit comments

Comments
 (0)