Changing color of TreeGrid if content match

Found my answer here Why deprecate Column.setClassNameGenerator in 24.5.0?

My issue is that I was using setClassNameGenerator() instead of setPartNameGenerator()
In the CSS I had to use this one

vaadin-grid::part(highlighted) {
    background: var(--lumo-error-color-10pct);
}

This do what I wanted → Changing the color of the cell if the cell meet a Criteria

I haven’t found how to properly use setClassNameGenerator() though