ionic-team / ionic-team/capacitor-assets

Dark mode support?

Open
#622 2 comments 7 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
583
Forks
116
PR merge metrics
No merged PRs in 30d

Description

I just spent a ton of time trying to figure out how to make the background of my app icon black in dark mode and white in light mode. In the instructions, it says there's the `iconBackgroundColorDark` to change that with the generate command but it doesn't seem to do anything? If I'm misunderstanding this, please correct me but I don't see any changes with this dark mode option. The `splashBackgroundColorDark` seems to work.

I did finally get dark mode working thanks to this Stackoverflow answer: [https://stackoverflow.com/a/69731757/6581796](https://stackoverflow.com/a/69731757/6581796)

All I had to do was generate the icons with `iconBackgroundColor` set to black (not the dark mode option). Copy the `mipmap` folders and rename them to `mipmap-night-**`. Regenerate the icons with the white background. Copy the `mipmap-night-**` folders into the same place `android/app/src/main/res/`.

Couldn't this be done for me with the generate command so the icon supports both light and dark mode?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.