1

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
    The green channel seems straightforward: divide by 255. Red would be 255 minus green. And blue stays zero. Am I overlooking something? Please share with us any solution you have tried so far. What problems are you facing? – Ruud Helderman Jul 15 '22 at 05:33

1 Answers1

0

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

Falling10fruit
  • 197
  • 1
  • 12