I am using SASS in a project and use the "lighten" and "darken" functions in the scss file.
I need to dynamically create a stylesheet (a small subset actually) that uses a different starting colour and then produces the necessary "lighten" and "darken" colours.
The starting colour will be set by a user in the website CMS so I cannot use SASS to generate the css file.
I have tried various methods in C# to recreate the "lighten" and "darken" functions but I can't get the same results as produced by SASS.
For example, for a starting colour of #c640
db, SASS gives "lighten(#c640
db, 10%)" as #d36be3.
I have tried adjusting the luminance, also the RGB values and neither methods get me the same result as above.
Does anyone know exactly what the SASS function does and/or how to recreate it in C#?