@@ -47,13 +47,7 @@ class LyfiDeviceModuleMetadata extends DeviceModuleMetadata {
4747 );
4848
4949 static Widget _buildDeviceIcon (BuildContext context, double iconSize, bool isOnline) {
50- return Icon (
51- Icons .light_outlined,
52- size: iconSize,
53- color: isOnline
54- ? Theme .of (context).colorScheme.primary
55- : Theme .of (context).colorScheme.primary.withValues (alpha: 0.38 ),
56- );
50+ return Icon (Icons .light_outlined, size: iconSize, color: Theme .of (context).colorScheme.primary);
5751 }
5852
5953 static Widget _buildPrimaryStateIcon (BuildContext context, double iconSize) {
@@ -115,7 +109,7 @@ class LyfiDeviceModuleMetadata extends DeviceModuleMetadata {
115109 case LyfiMode .scheduled:
116110 return context.translate ('Scheduled' );
117111 case LyfiMode .sun:
118- return context.translate ('Sun Simulation ' );
112+ return context.translate ('Sun' );
119113 default :
120114 return '-' ;
121115 }
@@ -214,7 +208,7 @@ class _LyfiBrightnessChart extends StatelessWidget {
214208
215209 Widget _buildBarChart (BuildContext context, int channelCount) {
216210 final colorScheme = Theme .of (context).colorScheme;
217- final barBackColor = colorScheme.surfaceContainerLow ;
211+ final isDark = Theme . of (context).brightness == Brightness .dark ;
218212
219213 // Adaptive bar width: shrink as channel count grows
220214 final barWidth =
@@ -243,6 +237,16 @@ class _LyfiBrightnessChart extends StatelessWidget {
243237 final fraction = (value / lyfiBrightnessMax).clamp (0.0 , 1.0 );
244238 final currentEndColor = Color .lerp (lightStart, primaryColor, fraction)! ;
245239
240+ // Background rod: desaturate the channel color heavily and blend with the
241+ // surface so it looks muted but still carries a hint of the original hue.
242+ final hslColor = HSLColor .fromColor (primaryColor);
243+ final mutedColor = hslColor
244+ .withSaturation ((hslColor.saturation * 0.25 ).clamp (0.0 , 1.0 ))
245+ .withLightness (isDark ? 0.15 : 0.85 )
246+ .toColor ();
247+ // Blend with surface for a softer look
248+ final barBackColor = Color .lerp (colorScheme.surfaceContainerLow, mutedColor, 0.65 )! ;
249+
246250 groups.add (
247251 BarChartGroupData (
248252 x: i,
@@ -288,7 +292,7 @@ class _LyfiBrightnessChart extends StatelessWidget {
288292 label,
289293 style: Theme .of (context).textTheme.labelSmall? .copyWith (
290294 fontSize: channelCount > 6 ? 8.0 : 9.0 ,
291- color: colorScheme.onSurface.withValues (alpha: 0.7 ),
295+ color: colorScheme.onSurface.withValues (alpha: 0.38 ),
292296 ),
293297 );
294298 },
0 commit comments