I understand the issue you’re facing—I’ve encountered something similar before. I was able to resolve it using the following forum discussion:
For dynamically setting cell colors, you can refer to this thread for the logic:
You can adapt the approaches from these posts based on your data and use case. If you still face any issues after trying this, feel free to reach out—I’ll be happy to help further.