Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material 3 colorSchemeSeed and having plain black and white theme

With Material 3, colorSchemeSeed can be used to set the color for the entire app. This works for colors like Red, Blue, and Green. If left as default the color will be purple. When trying to use black color as a seed, the color defaults to purple. What would be the best way to have the Material 3 app, but have the color of the app Theme be plain black and white (in light and dark mode)?

like image 954
Nick Khotenko Avatar asked Oct 15 '25 04:10

Nick Khotenko


1 Answers

Easiest way would be to setup your ThemeData colorScheme manually. This is for light theme, you can just set Brightness.dark and swap around black and white for dark theme

ThemeData(
        useMaterial3: true,
        colorScheme: ColorScheme(
          brightness: Brightness.light,
          primary: Colors.black,
          onPrimary: Colors.white,
          secondary: Colors.white,
          onSecondary: Colors.black,
          error: Colors.red,
          onError: Colors.white,
          background: Colors.white,
          onBackground: Colors.black,
          surface: Colors.white,
          onSurface: Colors.black,
        ),
        textTheme: textTheme,
)
like image 169
seanyyyyyy Avatar answered Oct 17 '25 21:10

seanyyyyyy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!