Interpolate colors blue and yellow to make green (color wheel interpolation?)

Hello!

In the color wheel, if you combine two colors, for example blue and yellow, you would get the resulting color between them.
I am looking for a method to interpolate two colors and get a result exactly like in the color wheel. For the blue and yellow example, the result would be green.
image

As far as i can see, even in the material graph, the color interpolation works a bit different. (it lerps the RGB channels which gives a different color than the result from the color wheel)

I thought of a solution, to create a custom method and to specify each combination of colors manually…but i would prefer a more elegant solution.

Does unreal have any function for a interpolation between colors like in the color wheel? Or is there a way to do this programatically?

In my example i used variables of type Linear Color. Maybe is there other type of variable to get the desired solution?

I tried to use the interpolation formula:
c = a + (b - a) * t
where
a = color 1
b = color 2
c = resulting color
t = alpha

But i get the same result (i set the color of the text)
image

I don’t know if there’s any built in solution in the engine but based on this discussion you can try something like this however someone mentioned that for yellow and blue it’s a misconception that you would green therefore you will want to mix cyan with yellow to get green.

1 Like

Hah, i didn’t even took in consideration the fact that programatically blue and yellow wouldn’t make green :sweat_smile:

In this case i will stick with a custom method with a preset combination of collors

Thank you

1 Like