I'm trying to get a specific color of a gradient based on the position of an Active (an arrow in this case) in order to change the background color to the one obtained. The problem is that I also want to make the gradient scalable but by doing this the color is no longer obtained correctly, it's like the gradient is not really scaled and the color is still obtained as if it were the original size.
I don't think I've done something wrong so it definitely looks like a bug.
I leave an example with the problem. Tell me what you think... and if anyone knows a way to do it without this bug. Thanks!