MDL defines many RGB values as a string, so
$my-color: rgba($input-text-error-color, 0.9);
will result in an error: "Argument '$color' of 'rgba($color, $amount)' must be a color"
What we could do instead:
- Strip "rgb" or "rgba", "(", ")" and spaces from MDL SASS variable, e.g.
$input-text-error-color: unquote("rgb ( 213, 0,0)") => "213,0,0" - Split the comma separated string into a number list
"213,0,0" => [213, 0, 0] - Then feed the numbers into the wanted SASS function, e.g: