Home > Software engineering >  How to obtain the SASS function that associates two specific colours?
How to obtain the SASS function that associates two specific colours?

Time:12-08

I have the following two colours:

$light-green: #99E2D0;
$dark-green: #008766;

I'm sure I can get the dark green from the lighter green by using a SASS function (I noticed they have the same hue). I have tried many combinations using lighten(), darken(), saturate(), etc... but have not succeeded. I ask the following question: is there a way to find out which function associates two specific colours? Do you know which function I have to use to get that colour? Thank you in advance

CodePudding user response:

You can use online tool to find that for you such as Sass Colour Function Calculator.

In your example:

$light-green: #99E2D0;
$dark-green: darken(saturate($light-green, 44.27), 47.84);
  • Related