Skip to content

Commit 33272c9

Browse files
refactor(ui): simplify dark theme to monochrome grayscale
Replace vibrant glassmorphic design with clean monochrome palette where dark theme is the grayscale inversion of light theme. Changes: - Remove all vibrant accent colors (cyan, emerald, rose, amber) - Dark theme now uses black/white/greys inverted from light theme - Light theme colors remain unchanged - Remove opacity-based glass layers, use solid greys - Update JToggle to use Primary/Secondary instead of Accent - Simplify comments to reflect new monochrome approach Color mapping (dark theme inverted from light): - BgBase: #0F1419 (near-black) ← #FFFFFF (white) - BgSurface: #374151 (gray-700) ← #E5E7EB (gray-200) - TextPrimary: #FFFFFF (white) ← #111827 (gray-900) - Primary: #D1D5DB (gray-300) ← #374151 (gray-700) - Borders: #4B5563 (gray-600) ← #D1D5DB (gray-300) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent 2708858 commit 33272c9

4 files changed

Lines changed: 104 additions & 143 deletions

File tree

UnityProject/Packages/com.jasonxudeveloper.jengine.ui/Editor/Components/Form/JToggle.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ public class JToggle : VisualElement
4545

4646
// Theme-aware colors
4747
private static Color TrackOffColor => Tokens.IsDarkTheme
48-
? new Color(0.24f, 0.24f, 0.30f, 1f) // Dark grey in dark mode
49-
: Tokens.Colors.Secondary; // Medium grey (darker) in light mode
48+
? Tokens.Colors.Secondary // Medium-dark grey (gray-600) in dark mode
49+
: Tokens.Colors.Secondary; // Medium grey (gray-300) in light mode
5050

5151
private static Color TrackOnColor => Tokens.IsDarkTheme
52-
? Tokens.Colors.Accent // Cyan in dark mode
53-
: Tokens.Colors.Primary; // Dark grey in light mode
52+
? Tokens.Colors.Primary // Light grey (gray-300) in dark mode - inverted
53+
: Tokens.Colors.Primary; // Dark grey (gray-700) in light mode
5454

5555
private static Color ThumbColor => Tokens.IsDarkTheme
56-
? new Color(0.88f, 0.88f, 0.88f, 1f) // Light grey in dark mode
56+
? Tokens.Colors.TextPrimary // White in dark mode
5757
: Color.white; // Pure white in light mode
5858

5959
/// <summary>

UnityProject/Packages/com.jasonxudeveloper.jengine.ui/Editor/Components/Layout/JCard.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ namespace JEngine.UI.Editor.Components.Layout
3434
public class JCard : JComponent
3535
{
3636
/// <summary>
37-
/// Creates a new glassmorphic card container with light reflection borders.
37+
/// Creates a new card container with subtle borders.
3838
/// </summary>
3939
public JCard() : base("j-card")
4040
{
41-
// Apply glassmorphic card styling using JTheme helper
41+
// Apply card styling using JTheme helper
4242
JTheme.ApplyGlassCard(this);
4343

4444
// Set padding

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static void ApplySubtle(VisualElement element)
106106
}
107107

108108
/// <summary>
109-
/// Applies glassmorphic border with light reflection effect.
109+
/// Applies borders with theme-appropriate colors.
110110
/// </summary>
111111
/// <param name="element">The element to apply borders to.</param>
112112
/// <param name="subtle">Use subtle borders if true.</param>
@@ -121,7 +121,7 @@ public static void ApplyBorder(VisualElement element, bool subtle = false)
121121
}
122122
else
123123
{
124-
// Light reflection: top/left lighter, bottom/right darker
124+
// Uniform borders using BorderLight/BorderDark (same in monochrome)
125125
element.style.borderTopColor = Tokens.Colors.BorderLight;
126126
element.style.borderLeftColor = Tokens.Colors.BorderLight;
127127
element.style.borderBottomColor = Tokens.Colors.BorderDark;
@@ -158,9 +158,9 @@ public static void ApplyTransition(VisualElement element)
158158
}
159159

160160
/// <summary>
161-
/// Applies glassmorphic card style (surface + borders + transitions).
161+
/// Applies card style (surface + borders + transitions).
162162
/// </summary>
163-
/// <param name="element">The element to style as a glass card.</param>
163+
/// <param name="element">The element to style as a card.</param>
164164
public static void ApplyGlassCard(VisualElement element)
165165
{
166166
ApplySurface(element);

0 commit comments

Comments
 (0)