'using CSS color variable inside SCSS function

If I just use the SCSS variable and SCSS function to modify the color as shown below then it works as expected:

$blue:#4f8afb;
$transparent-blue: tint($blue, 95);

but If I try to assign a CSS variable to the above used SCSS variable then it does not work

$blue:var(--primary-blue);
$transparent-blue: tint($blue, 95);

I get this error: enter image description here

I even tried interpolation, which also gives the same error:

$blue:#{var(--primary-blue)};


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source