@@ -325,6 +325,7 @@ function legacyThemeMode(theme: ThemePreference): ThemeAppearance | null {
325325// Measured from the live t3.chat default theme. Translucent chat surfaces are
326326// flattened over --chat-background so this opaque palette reproduces the
327327// pixels users see after T3 Chat's blur and noise layers are composited.
328+ // Foreground pairs deviate where necessary to keep normal text at WCAG AA.
328329const T3_CHAT_LIGHT_COLORS : ThemeColors = {
329330 canvas : "#fdf7fd" ,
330331 // T3 Code's workspace header belongs to the chat panel, so keep it seamless
@@ -346,31 +347,31 @@ const T3_CHAT_LIGHT_COLORS: ThemeColors = {
346347 border : "#eee1ed" ,
347348 input : "#e7c1dc" ,
348349 focus : "#db2777" ,
349- accent : "#e33f86 " ,
350+ accent : "#db2777 " ,
350351 accentForeground : "#ffffff" ,
351352 secondary : "#f1c4e6" ,
352353 secondaryForeground : "#77347c" ,
353354 muted : "#eaa7cb" ,
354- mutedForeground : "#ac1668 " ,
355- placeholder : "#ad83b0 " ,
355+ mutedForeground : "#8d1255 " ,
356+ placeholder : "#8b5f90 " ,
356357 secondaryLabel : "#ac1668" ,
357358 iconMuted : "#ac1668" ,
358359 error : "#f7086c" ,
359360 errorForeground : "#9d174d" ,
360361 errorSurface : "#fde4f1" ,
361362 warning : "#f59e0b" ,
362- warningForeground : "#b45309 " ,
363+ warningForeground : "#b05109 " ,
363364 warningSurface : "#fcf0ea" ,
364- update : "#e33f86 " ,
365+ update : "#db2777 " ,
365366 updateForeground : "#ac1668" ,
366367 updateSurface : "#fadfef" ,
367368 accentSurface : "#f3e6f5" ,
368369 accentSurfaceForeground : "#454554" ,
369370 messageSurface : "#f7def2" ,
370371 messageForeground : "#492c61" ,
371- messageAction : "#e33f86 " ,
372+ messageAction : "#db2777 " ,
372373 messageActionForeground : "#ffffff" ,
373- messageActionHover : "#d56698 " ,
374+ messageActionHover : "#c12269 " ,
374375 // T3 Chat uses a light lavender code surface in light mode. Keeping the
375376 // dark plum pair here also leaked the dark palette into T3 Code's diffs.
376377 codeBackground : "#f5ecf9" ,
@@ -422,7 +423,7 @@ const T3_CHAT_DARK_COLORS: ThemeColors = {
422423 secondaryForeground : "#d4c7e1" ,
423424 muted : "#423a45" ,
424425 mutedForeground : "#e7d0dd" ,
425- placeholder : "#8f8699 " ,
426+ placeholder : "#968d9f " ,
426427 secondaryLabel : "#e7d0dd" ,
427428 iconMuted : "#d4c7e1" ,
428429 error : "#9d174d" ,
@@ -549,8 +550,8 @@ const T3_CODE_DARK_THEME_COLORS: ThemeColors = {
549550 textMuted : "#818181" ,
550551 border : "#191919" ,
551552 input : "#1e1e1e" ,
552- focus : "#366ffb " ,
553- accent : "#366ffb " ,
553+ focus : "#346bf1 " ,
554+ accent : "#346bf1 " ,
554555 accentForeground : "#ffffff" ,
555556 secondary : "#141414" ,
556557 secondaryForeground : "#f5f5f5" ,
@@ -565,16 +566,16 @@ const T3_CODE_DARK_THEME_COLORS: ThemeColors = {
565566 warning : "#fe9a00" ,
566567 warningForeground : "#ffb900" ,
567568 warningSurface : "#312108" ,
568- update : "#366ffb " ,
569+ update : "#346bf1 " ,
569570 updateForeground : "#51a2ff" ,
570- updateSurface : "#121c35 " ,
571+ updateSurface : "#121b34 " ,
571572 accentSurface : "#141414" ,
572573 accentSurfaceForeground : "#f5f5f5" ,
573574 messageSurface : "#141414" ,
574575 messageForeground : "#f5f5f5" ,
575- messageAction : "#366ffb " ,
576+ messageAction : "#346bf1 " ,
576577 messageActionForeground : "#ffffff" ,
577- messageActionHover : "#3265e3 " ,
578+ messageActionHover : "#3061d9 " ,
578579 codeBackground : "#111111" ,
579580 codeForeground : "#f5f5f5" ,
580581 sidebar : "#000000" ,
@@ -941,12 +942,14 @@ export function createVividThemeColors(
941942 const sidebarRgb = themeOklchToRgb ( sidebar ) ;
942943 const surface = surfaceAt ( 0.015 ) ;
943944 const surfaceRaised = surfaceAt ( 0.05 ) ;
945+ const surfaceRaisedRgb = themeOklchToRgb ( surfaceRaised ) ;
944946 const surfaceOverlay = surfaceAt ( 0.075 ) ;
945947 const border = surfaceAt ( dark ? 0.16 : 0.12 , Math . min ( 0.07 , accent . C * 0.35 ) ) ;
946948 const input = surfaceAt ( dark ? 0.21 : 0.16 , Math . min ( 0.08 , accent . C * 0.4 ) ) ;
947949 const secondary = surfaceAt ( dark ? 0.1 : 0.06 , Math . min ( 0.09 , accent . C * 0.5 ) ) ;
948950 const secondaryRgb = themeOklchToRgb ( secondary ) ;
949951 const muted = surfaceAt ( dark ? 0.06 : 0.04 , Math . min ( 0.06 , accent . C * 0.35 ) ) ;
952+ const mutedRgb = themeOklchToRgb ( muted ) ;
950953 const accentSurface = surfaceAt ( dark ? 0.13 : 0.08 , Math . min ( 0.11 , accent . C * 0.55 ) ) ;
951954 const accentSurfaceRgb = themeOklchToRgb ( accentSurface ) ;
952955 const messageSurface = surfaceAt ( dark ? 0.16 : 0.1 , Math . min ( 0.13 , accent . C * 0.6 ) ) ;
@@ -958,6 +961,8 @@ export function createVividThemeColors(
958961 themeRgbToHexColor (
959962 themeOklchToRgb ( solveOklchLightness ( textBase , surfaceRgb , 4.6 , dark ? "lighter" : "darker" ) ) ,
960963 ) ;
964+ const mutedForeground = foregroundOn ( mutedRgb ) ;
965+ const placeholder = foregroundOn ( surfaceRaisedRgb ) ;
961966
962967 const actionHover : ThemeOklch = { ...action , L : action . L + ( dark ? 0.06 : - 0.06 ) } ;
963968
@@ -986,8 +991,8 @@ export function createVividThemeColors(
986991 secondary : hex ( secondary ) ,
987992 secondaryForeground : foregroundOn ( secondaryRgb ) ,
988993 muted : hex ( muted ) ,
989- mutedForeground : themeRgbToHexColor ( textMutedRgb ) ,
990- placeholder : themeRgbToHexColor ( textMutedRgb ) ,
994+ mutedForeground,
995+ placeholder,
991996 secondaryLabel : themeRgbToHexColor ( textMutedRgb ) ,
992997 iconMuted : themeRgbToHexColor ( textMutedRgb ) ,
993998 update : themeRgbToHexColor ( accentRgb ) ,
@@ -1174,6 +1179,8 @@ export function createManagedThemeColors(
11741179 const surfaceOverlay = mixThemeRgbColors ( canvas , text , appearance === "dark" ? 0.18 : 0.06 ) ;
11751180 const secondary = mixThemeRgbColors ( canvas , accent , appearance === "dark" ? 0.2 : 0.08 ) ;
11761181 const muted = mixThemeRgbColors ( canvas , accent , appearance === "dark" ? 0.13 : 0.06 ) ;
1182+ const mutedForeground = readableThemeText ( muted , text , 1 , 4.6 ) ;
1183+ const placeholder = readableThemeText ( surfaceRaised , text , 1 , 4.6 ) ;
11771184 const accentSurface = mixThemeRgbColors ( canvas , accent , appearance === "dark" ? 0.3 : 0.14 ) ;
11781185 const messageSurface = mixThemeRgbColors ( canvas , accent , appearance === "dark" ? 0.36 : 0.18 ) ;
11791186 const toolbarControl = mixThemeRgbColors ( chrome , accent , appearance === "dark" ? 0.2 : 0.08 ) ;
@@ -1244,8 +1251,8 @@ export function createManagedThemeColors(
12441251 secondary : themeRgbToHexColor ( secondary ) ,
12451252 secondaryForeground : themeRgbToHexColor ( readableThemeForeground ( secondary ) ) ,
12461253 muted : themeRgbToHexColor ( muted ) ,
1247- mutedForeground : themeRgbToHexColor ( textMuted ) ,
1248- placeholder : themeRgbToHexColor ( textMuted ) ,
1254+ mutedForeground : themeRgbToHexColor ( mutedForeground ) ,
1255+ placeholder : themeRgbToHexColor ( placeholder ) ,
12491256 secondaryLabel : themeRgbToHexColor ( textMuted ) ,
12501257 iconMuted : themeRgbToHexColor ( textMuted ) ,
12511258 accentSurface : themeRgbToHexColor ( accentSurface ) ,
0 commit comments