Can someone assist me in creating a gradual transition between two distinct colors by utilizing SASS and the color functions that are available?
Given a starting color, such as #f1a100, and an ending color, #2ec3fb, how can I generate multiple classes that represent steps between these two colors?
I've tried the code below, but it doesn't achieve the desired outcome. What is the correct approach to transitioning between two specific colors?
$startColor: #f1a100;
@for $i from 1 through 8 {
&.m#{$i} {
background: adjust-hue($startColor, 0 - ($i * 10));
}
}
The current result of this code is as follows: