Change android navigation bar color programmatically

How to change android navigation bar programmatically with expo managed? I know how to choose a color in the app.json, but I want to change it to adapt to dark/light theme on running time, not just at the start-up.

I’m not talking about the StatusBar, I mean the navigation bar at the bottom of the screen.