Grid style each cell differently

Hello,


Problem

I am trying to set different cell background color for differnt cells. It does not follow a pattern as the user can decide to choose one color for the first cell, second color for second cell and so on and they do not have to be repeated to the next row or the next row could have another set of colors for cell background.

I am using a ValueProvider to populate the grid.


Attempted solutions

I have already tried the get page styles and add it to the css that way but since there are to be multiple tables on one page, with the same ID so I cannot use the set id and set different css for each grid.

I cannot use styleGenerator as it is not on a certain value that the color needs to be added (Atleast I think).


Trying to know

Is there a way to inject inline css for each cell of the grid since I get the input about colors from an object from backend? Or another way to achieve styling on each cell from the valueprovider output.