dynamic row/cell styling

How can I style rows/cells in vaadin grid?
I know that there is grid.setClassNameGenerator but is there an option to set the style directly without a class?
Usecase is: the user can change the row/cell color using a color picker. So I do have a hex color that i need to inject somehow.

Is this possible and if so how? Or is there an other way?

Unless you want to re-render the whole Grid, maybe add a div around each cell, that actually gets the color :thinking:

Use CSS variables in connection with grid/column level classNameGenerator

See How do I dynamically set the progress bar color - Vaadin Cookbook

and How do I set grid cell background color dynamically - Vaadin Cookbook

Thanks alot. that helped me find a good solution and saved alot of time :heart: