I'm trying to convert some LESS color functions (lighten/darken) to use the CSS color-mix function instead so that I can make use of CSS variables.
I have a dependency that uses these internally and have written an NPM post-install script that automatically converts them. The conversion is working fine, however the issue I'm facing is that the output is off.
Here is an example of the output:
For the color-mix, I'm using:
color-mix(in srgb, white 5%, var(--my-color)); // lighten(@mycolor, 5%);
color-mix(in srgb, white 50%, var(--my-color)); // lighten(@mycolor, 50%);
Any idea how can I more closely match what I'm seeing from LESS?