How to tween/Lerp between two numbers

Viewed 61

I want to be able to lerp between two numbers (Actually RGB). Sort of like a slider. Where 0 = (255,0,0), and 1 = (0,255,0). Is there any way to code with without an external library or function? Thanks.

1 Answers

Okay, HMMMMMMM thinks

Okay, suppose the slider affects a variable called Slider

You could do this:

RGB(255 - (Slider * 255), Slider * 255, 0);

That should do, I think

Related