Make the custom accent-color picker actually retint the app

NooColors (the color source for nearly the whole redesigned UI) only
had two states: the fixed violet palette, or a Material You dynamic
scheme when "Match wallpaper" was on. The 5-swatch custom accent
picker still wrote to SettingsController.seedColor, but nothing read
it back into NooColors - it only reached the underlying Material
ColorScheme, which the Noo-styled UI doesn't use, so every custom
swatch looked identically purple.

Add NooColors.fromSeed, which retints just the accent/accentText/
accentSoft roles from a chosen seed color via ColorScheme.fromSeed
(bg/surface/fg etc. stay the fixed warm-neutral palette, unlike
dynamic color which reshapes everything to match the wallpaper), and
wire it into AppTheme.light/dark. Add a "Default" (Noo violet) swatch
to the picker, and move SettingsController's initial seed color to
that same violet so a fresh install - or any device without dynamic
color - keeps today's look instead of picking up the leftover
Nextcloud-blue default from before seed colors did anything visible.
This commit is contained in:
2026-09-28 13:11:11 -04:00
parent c9889c69b8
commit 72472c771a
6 changed files with 149 additions and 34 deletions
+12 -2
View File
@@ -5,6 +5,15 @@ import 'design_tokens.dart';
class AppTheme {
static const Color defaultNextcloudBlue = Color(0xFF0082C9);
/// The design system's own fixed violet - [NooColors.light]/`.dark`'s
/// `accent`, and the accent picker's "Default" swatch. Also
/// [SettingsController]'s initial [SettingsController.seedColor], so a
/// fresh install (or any device without Material You dynamic color) keeps
/// today's violet look rather than picking up the leftover
/// [defaultNextcloudBlue] default from before seed colors actually did
/// anything to the Noo-styled UI (see [NooColors.fromSeed]).
static const Color defaultAccent = Color(0xFF8D0DE3);
// Flutter's Material 3 default (ZoomPageTransitionsBuilder) doesn't
// implement Android's predictive-back gesture at all. Opting into
// PredictiveBackPageTransitionsBuilder here (Android only) is required —
@@ -24,6 +33,7 @@ class AppTheme {
static const _sliderTheme = SliderThemeData(year2023: false);
static const List<Color> seedColors = [
defaultAccent, // Default (Noo Violet)
Color(0xFF0082C9), // Nextcloud Blue
Color(0xFF009688), // Ocean Teal
Color(0xFF6750A4), // Deep Purple
@@ -87,7 +97,7 @@ class AppTheme {
);
final nooColors = (useDynamicColor && dynamicScheme != null)
? NooColors.fromDynamicScheme(dynamicScheme)
: NooColors.light;
: NooColors.fromSeed(seedColor, Brightness.light);
return ThemeData(
useMaterial3: true,
@@ -131,7 +141,7 @@ class AppTheme {
);
var nooColors = (useDynamicColor && dynamicScheme != null)
? NooColors.fromDynamicScheme(dynamicScheme)
: NooColors.dark;
: NooColors.fromSeed(seedColor, Brightness.dark);
if (amoled) {
// True OLED black across every surface tone Material 3 hands out -