Blueprint scripting provides a Lerp
node that is practically identical to the Lerp node found in the material graph. When attempting to directly transition from one linear color to another, there’s no simpler way than to use a Lerp.
This will, however, produce a linear transition (that’s the L in lerp — linear interpolation) which isn’t always the desired result. (Note that the use of the adjective ‘linear’ in ‘linear color’ has nothing to do with the linear nature of Lerp.)
Anyway, if you need the color transition to be a bit smoother, i.e. non-linear, you’ll have to get a bit creative since there’s not a built-in node that does non-linear interpolation directly on color values. One solution is to first smooth the alpha (a float value) by using, for example, a FInterp Ease in Out
node, which you can then feed into a Lerp (linear color)
node. You can then control the smoothness by adjusting the exponent parameter.
That’s just one approach. There’s probably a dozen different ways to transition from one color to another in Blueprint using combinations of lerp, the various float interpolation functions, the CInterpTo
node, etc. You’ll have to give some thought to which techniques work best for your case, because there’s no generic “best way” for every situation.