-
Can dark mode be provided when the theme is all black The current dark mode is purple or other colors. Is there any configuration that can be set to all black |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @laterdayi, Thanks for your question. Yes it can, there are many ways to tune and adjust the amount color blend into both light and dark background colors, there are also different background colors used for different surfaces (background) by different Widgets. So it is important to know which background we are talking about. For black scaffold background the simplest way is typically to turn on use "True black": FlexThemeData.dark(
darkIsTrueBlack: true,
); This does it for the Usually it is a good idea to have a bit of another dark shade on ColorScheme They won't go to zero though, they will go to the dark theme base level, which is and almost black ( If you really want them to be black too (and you are not using M3 seed generated This is not available in Playground, but this is way to make them all black with the API, it will override any colors come from the built-in themes FlexThemeData.dark(
blendLevel: 0,
surface: Colors.black,
background: Colors.black,
scaffoldBackground: Colors.black,
); Keep the blend level at 0 though, because increasing it will start adding blend color into Using M3 Seed generated ColorScheme?If you did the above (not the API only setup, the screenshots) and turn on This dark This new ColorScheme then becomes to input for the starting point for the optional surface blend additions on top of that. Surface blends was done by FlexColorScheme and used way before M3 ColorScheme algo was a thing, its idea is a bit similar though. The result of the seed output becomes input for additional blends, in this case the dark starting surface and background level becomes However, when using seeded ColorScheme, we have a few additional toggles that in addition to selected FlexTones seed strategy can be used to adjust the result after the seed generation, but before it becomes input for the blends. shown in green box below, on option is making This then becomes input to blends, that as long as blend level is zero, will result in all three main surface colors being black. Again if you up the blend level, but keep Lastly, by default the used blend color and surface tint color in M3, is equal to primary color, but it does not have to be, it can be any color: Here using a "Carmel" color on the purple primary theme. This also impact the elevation tint color used by Material 3. Above scaffold is still black but other surfaces got this Carmel tint, also the elevated color picker dialog itself got it. Typically keeping it primary color is the best approach, but maybe some optional design can look cool too. You have probably noticed that any theme change you make, is impacted in and directly reflected in the Themes Playground app itself too and all widgets and light/dark mode it uses, so it provides a good reflection of what the current configured theme looks like. This in addition to the mock sample apps in the simulated devices. Hope this helps 🙏🏻 😄 |
Beta Was this translation helpful? Give feedback.
-
Thank you, you are my angel |
Beta Was this translation helpful? Give feedback.
-
Is there a way to make the button black as well |
Beta Was this translation helpful? Give feedback.
Hi @laterdayi,
Thanks for your question. Yes it can, there are many ways to tune and adjust the amount color blend into both light and dark background colors, there are also different background colors used for different surfaces (background) by different Widgets. So it is important to know which background we are talking about.
For black scaffold background the simplest way is typically to turn on use "True black":
This does it for the
ThemeData.scaffoldBackgroundColor
. WhendarkIsTrueBlack: true
is set the scaffold background will always be black regardless of used blends or M3 seed scheme.Usually it is a good idea to have a bit of anoth…