I am coding software where I want to compare color hues by ratios of Red and Blue to Green, avoiding the usual Hue calculation in the HSV/HSL color models, because that calculation involves tests for predominant color.
For example, in an orangey color, Red may be 80 greater than Green, Blue may be 70 lower, so the ratio would be 80/-70 or -1.14. If I then have another, fainter orangey color, the ratio may be 40/-35, giving the same result of -1.14. Nice and simple, easy to work with.
The problem is that a cyanish color with the ratio of -40/35 will have the same result. In addition, ratios with a 0 won't work, such as red 255/0.
I'm running around in circles, trying various approaches, with no solution in sight. Is there a way of making this work?