Pick a suitable way to style your polygon:
https://github.com/lclpedro/leaflet.pm?tab=readme-ov-file#customize-style
Then read the state from your color atom and use it.