Confused about dark mode :thread:
# compose
m
Confused about dark mode 🧵
When I first started with Compose, one of the first features I added was to have three themes two light and one dark. I naively though that a dark theme is just a theme with dark colors, but it's not it's full of particular things like elevations. What it seams logical to me is that a dark theme should be just like any other theme only that it's dark ... Now when I set the system into dark mode all kind of weird stuff happens. So I have to recheck all my assumptions.
âž• 1
a
I agree, also hit into this problem. Unfortunately it is by design: https://material.io/design/color/dark-theme.html#properties But there should a way to disable this behaviour. Something like this:
Copy code
Providers(LocalElevationOverlay provides null)
c
"all kind of weird stuff happens." What kind of stuff? I haven't noticed anything strange.
a
From my point of view, I find it odd that the background colour of the surface depends on the elevation. Usually designers provide ready-to-use colours, so this behaviour is the first to be switched off.
m
Well at least I've found another human being that founds dark mode a little bit lets say arcane .... weird . I don't want to argue with anybody just I would like that all themes are the same I found weird to divide them between dark and non dark and have to place in code if dark then this ... As for weird stuff happening, well theming has got problems since canary 1 and has stabilized just in last betas, most people don't notice because they just use one theme (which is perfectly ok)
b
Imo disabling absolute patent elevation is not the best solution. There is a reason it exists and turning it off goes against how MD works. Your designers should be made aware of dark mode principles in material design to provide Android variances in your design kit.
âž• 1
a
I think the reason why it exists is to "simulate" the material/light/shadow behaviour. And the question here is whether particular Designers want this behaviour or not. Personally I consider it as over-engineering, it is just too smart. There are possible reasons why designers might not like this "smart" behaviour. E.g. they may want the elevated surface background colour to match some another colour on the screen. Just because it looks better in this particular case. In this case it is much simpler to just pick the background colour from Figma and apply it in the code. So it all depends on the project/designer perception/etc. And it is good there is a way to disable it.
m
Well it's the fucking same reason, that the one that leads everybody to eat XML enlightenment 20 years ago, because we are smarter than you ... anyway we'll pass through it!
🤔 1
c
Just create your own card composable instead of the material one, and you're back in business!
âž• 1