this code causes “ColorA” to go from 0.69 to the desired 0.32
however “ColorB” goes from 0.16 to 0.074 (off by ~0.3)

how do I tune this formula so that colors with less lightness are less affected by “extralightness”? I feel like I am somewhat close to what I want already…

What can I do for this formula to apply less 0.3 on the darker color? I realize I’m not off by much but I also don’t quite understand what I can change to affect the range by which lightness changes.

I’m multiplying the decrease in lightness by the original lightness so colors with less original lightness get less affected by the change. But how can I modify the range/degree to how much the difference is supposed to be?

Some pointers with this logic would be appreciated, thanks!

use AnimationCurve in a range of [0,1] to define the specific function you want. You can set key values in the curve, and then set how you want the curve to interpolate between the two values. In the editor, it shows a graph view of the curve, so its easy to make adjustments there.

You don’t need to use it with animations, it will work for anything.

Look up “How to find a polynomial from given points”. If you have only two points, you’re probably only going to be able to find a straight line though.

If you want to interpolate with known tangents and slopes between points, you want to use splines, and probably the cubic hermite spline (which is what the AnimationCurve uses under the hood).