I'm looking for a way to do the following programatically:
tr.product-row:not(.expanded-row):active {
background-color: red; <--this part will be calculated in my .ts file
}
The reason is that I want the active color to be a lighter version of the color of a different element. I can calculate the color I need but don't know how to set it.
Can it be done with Renderer2?
lighten()function would suit your need. If you're using just CSS, you can tryfilter: brightness();