Oh, I see now the change in the definition of `ratio`. And I was wrong about the squaring, it just has to do with the Euclidean distance calculation. Is this really necessary? Why can't the color be scaled as before?