I'd need to darken a color specified in a CSS variable.
I have this CSS code:
background:linear-gradient(to right,
var(--mainContainer-background) 80%,
@gray-light 100%);
CSS variable --mainContainer-background can be changed by user on-the-fly with a bit of JS, but I'd want to set a darken variation of this color in my background gradient, for example I'd want that gradient start from a color that is 20% darker of one stored in --mainContainer-background.
Is possible in some way?