Skip to content

Commit 58faf0e

Browse files
fix(ui): correct Primary button hover/active colors for true inversion
Fixed Primary button hover and active states to properly invert with light theme's Secondary colors: Dark mode Primary (was wrong): - Hover: #E0E0E0 → #9A9A9A (now matches light's SecondaryHover) - Active: #C0C0C0 → #6A6A6A (now matches light's SecondaryActive) Now the inversion is complete and consistent across all button states. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent 5b47b91 commit 58faf0e

File tree

1 file changed

+14
-14
lines changed
  • UnityProject/Packages/com.jasonxudeveloper.jengine.ui/Editor/Theming

1 file changed

+14
-14
lines changed

UnityProject/Packages/com.jasonxudeveloper.jengine.ui/Editor/Theming/Tokens.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,36 +89,36 @@ public static class Colors
8989
// ===== SEMANTIC COLORS =====
9090
// All use neutral grayscale values, no vibrant colors
9191

92-
/// <summary>Primary button color</summary>
92+
/// <summary>Primary button color - inverted between themes</summary>
9393
public static Color Primary => IsDarkTheme
94-
? FromHex("#E0E0E0") // Light grey (neutral) - with black text
95-
: FromHex("#374151"); // Medium-dark grey (original light theme color)
94+
? FromHex("#D0D0D0") // Light grey in dark mode = same as light's Secondary
95+
: FromHex("#374151"); // Medium-dark grey in light mode
9696

9797
public static Color PrimaryHover => IsDarkTheme
98-
? FromHex("#ECECEC") // Even lighter grey (neutral)
99-
: FromHex("#4B5563"); // Slightly lighter (original)
98+
? FromHex("#9A9A9A") // Dark mode = light's SecondaryHover (inverted)
99+
: FromHex("#4B5563"); // Light mode slightly lighter
100100

101101
public static Color PrimaryActive => IsDarkTheme
102-
? FromHex("#D0D0D0") // Medium-light grey (neutral)
103-
: FromHex("#1F2937"); // Very dark grey (original)
102+
? FromHex("#6A6A6A") // Dark mode = light's SecondaryActive (inverted)
103+
: FromHex("#1F2937"); // Light mode much darker
104104

105105
/// <summary>Primary button text color</summary>
106106
public static Color PrimaryText => IsDarkTheme
107-
? FromHex("#000000") // Black text on light button in dark mode
107+
? FromHex("#111111") // Black text on light button in dark mode
108108
: FromHex("#FFFFFF"); // White text on dark button in light mode
109109

110-
/// <summary>Secondary button color</summary>
110+
/// <summary>Secondary button color - inverted between themes</summary>
111111
public static Color Secondary => IsDarkTheme
112-
? FromHex("#4A4A4A") // Medium-dark grey (neutral) - inverted from light's #D0D0D0
113-
: FromHex("#D0D0D0"); // Medium grey (neutral)
112+
? FromHex("#374151") // Medium-dark grey in dark mode = same as light's Primary
113+
: FromHex("#D0D0D0"); // Light grey in light mode
114114

115115
public static Color SecondaryHover => IsDarkTheme
116-
? FromHex("#6A6A6A") // Medium grey (neutral)
116+
? FromHex("#4B5563") // Lighter on hover
117117
: FromHex("#9A9A9A"); // Darker on hover
118118

119119
public static Color SecondaryActive => IsDarkTheme
120-
? FromHex("#9A9A9A") // Light-medium grey (neutral)
121-
: FromHex("#6A6A6A"); // Much darker
120+
? FromHex("#1F2937") // Darker on active
121+
: FromHex("#6A6A6A"); // Much darker on active
122122

123123
/// <summary>Secondary button text color</summary>
124124
public static Color SecondaryText => IsDarkTheme

0 commit comments

Comments
 (0)