Use the background and primary colors' own alpha

Panels, buttons, cards and tiles multiplied the theme's background and
primary colors by a fixed alpha, so they were translucent however the
colors were set. They now use the colors as they are, and the defaults
and presets carry the old translucency in their alpha instead. Popups
stay nearly solid so they're readable over panels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-28 19:56:24 +02:00
co-authored by claude
parent 3436054112
commit 5c0912f0cf
9 changed files with 27 additions and 18 deletions
@@ -10,14 +10,14 @@ import org.saturnclient.config.property.SelectProperty;
public class Theme {
public static ConfigManager config;
// Main UI background (slightly warm dark to match Saturn tone)
public static final ColorProperty BACKGROUND = Property.color(0xFF12100D);
// Main UI background (slightly warm dark to match Saturn tone), translucent over the world
public static final ColorProperty BACKGROUND = Property.color(0xD112100D);
// Default text color
public static final ColorProperty FOREGROUND = Property.color(0xFFF2E6D2);
// Widget default background (normal state)
public static final ColorProperty PRIMARY = Property.color(0xFF1C1915);
// Widget default background (normal state), translucent over the world
public static final ColorProperty PRIMARY = Property.color(0xB81C1915);
// Widget text color
public static final ColorProperty PRIMARY_FG = Property.color(0xFFEAD9B8);
@@ -62,10 +62,10 @@ public class Theme {
}
public static final List<Preset> PRESETS = List.of(
new Preset("Saturn", 0xFF12100D, 0xFFF2E6D2, 0xFF1C1915, 0xFFEAD9B8, 0xFFE2BF7D, 0xFF1A140A, 0xFFE2BF7D),
new Preset("Midnight", 0xFF0E1117, 0xFFE4EAF5, 0xFF171C26, 0xFFC9D4E8, 0xFF8FB3FF, 0xFF0A1224, 0xFF8FB3FF),
new Preset("Amethyst", 0xFF120F17, 0xFFEDE4F7, 0xFF1C1724, 0xFFD8C9EB, 0xFFC79BFF, 0xFF1A0F2A, 0xFFC79BFF),
new Preset("Emerald", 0xFF0D1210, 0xFFE2F2EA, 0xFF16201B, 0xFFC4E0D2, 0xFF7FD1A8, 0xFF0A1F15, 0xFF7FD1A8));
new Preset("Saturn", 0xD112100D, 0xFFF2E6D2, 0xB81C1915, 0xFFEAD9B8, 0xFFE2BF7D, 0xFF1A140A, 0xFFE2BF7D),
new Preset("Midnight", 0xD10E1117, 0xFFE4EAF5, 0xB8171C26, 0xFFC9D4E8, 0xFF8FB3FF, 0xFF0A1224, 0xFF8FB3FF),
new Preset("Amethyst", 0xD1120F17, 0xFFEDE4F7, 0xB81C1724, 0xFFD8C9EB, 0xFFC79BFF, 0xFF1A0F2A, 0xFFC79BFF),
new Preset("Emerald", 0xD10D1210, 0xFFE2F2EA, 0xB816201B, 0xFFC4E0D2, 0xFF7FD1A8, 0xFF0A1F15, 0xFF7FD1A8));
public static void init(ConfigManager parent) {
config = new ConfigManager(parent, "UI Style");
@@ -98,10 +98,19 @@ public class Theme {
}
/**
* Translucent background for panels drawn over the world
* Background for panels drawn over the world, as translucent as the
* background color is
*/
public static int getPanelBg() {
return withAlpha(0.82f, BACKGROUND.value);
return BACKGROUND.value;
}
/**
* Background for popups, which sit over other panels: the background color,
* kept nearly solid so what's under it doesn't show through
*/
public static int getPopupBg() {
return withAlpha(0.97f, BACKGROUND.value | 0xFF000000);
}
/**