You can smoothly transition from one colour to the other if you fade each separate component RGB to the new RGB.
Have your code work out the biggest component that needs changing, that will gave a change value of 1.0, Then the other components will have smaller change values less than one.
Set up a loop that will change the values by there increments. Convert these accumulated values from float to byte before you apply the new colour values. The delay in your loop to do this will determine the speed of the fade.
You build it up one step at a time, testing as you go.
Or you look and see in the fast LED documentation to see if they have an example of fading from one colour to another.
EVERY_N_MILLISECONDS(blendRate)
{
static uint8_t k; // the amount to blend [0-255]
if (colorCurrent.h == colorTarget.h)
{ // Check if target has been reached
colorStart = colorCurrent;
// colorTarget = CHSV(random8(), 255, 255); // new target to transition toward
k = 0; // reset k value
show = false;
}
colorCurrent = blend(colorStart, colorTarget, k, SHORTEST_HUES);
fill_solid(leds, NUM_LEDS, colorCurrent);
k++;
}
I'm currently using this code to change one color into another but I don't know if this right
That first parameter, shown as 100 in your code above, should be a variable which changes from 0 to 99 as the colour changes from the previous to the new colour.
I was not aware of that blend() function, maybe that effectively does what I am suggesting, but in an easier or more flexible way.
Note this solution uses HSV colour space to do the transition. You get a different set of intermediate colours if you use another colour space like RGB space.