When setting the navbar live between light and dark themes, the icons would stick to light colors, making them indistinguishable when against a light background.
My (Local) Fix/Mod to the package
My project is only using API 30+ for changing navbar color, so the following changes to my local build worked for me:
Options to fix
A Programmatically detect brightness of navbar input, and set the icon to light or dark mode accordingly.
B Add an input arg to setColor to manually set light/dark icon theme.
I chose to fix with the easy solution ( b ).
Mods to the node module, react-native-navbar-color
Note, my changes are only for API 30+. This is pretty restrictive. You can add support for lower api's if you want. This was a quick mod on my end to work with only new(est) android versions, and ignore setting on older.
For my app, the user can change themes at runtime, or use device default. So, I added a side-effect to update the NavigationBar to match the theme's background & contrast mode.
I had a similar issue.
When setting the navbar live between light and dark themes, the icons would stick to light colors, making them indistinguishable when against a light background.
My (Local) Fix/Mod to the package
My project is only using API 30+ for changing navbar color, so the following changes to my local build worked for me:
Options to fix
Mods to the node module, react-native-navbar-color
RNNavBarColorModule.java
build.gradle
index.js
Local Project Mods (In your project)