capacitor-assets icon indicating copy to clipboard operation
capacitor-assets copied to clipboard

Dark mode support?

Open Bash4195 opened this issue 1 year ago • 2 comments

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

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?

Bash4195 avatar Sep 04 '24 18:09 Bash4195

Related issue: https://github.com/ionic-team/capacitor-assets/issues/603

ptmkenny avatar May 10 '25 13:05 ptmkenny

I attempted to use OP's workaround but ended up with what I assume is my white logo but it had a white background. I verfied that the mipmap-night-** folders had images that I had expected.

Will-at-FreedomDev avatar May 28 '25 15:05 Will-at-FreedomDev