I have run a chemical test that produces a color depending on how much of a given chemical is in the sample. It is green if there is no chemical, and yellow if there is a saturating amount of chemical. I have used my camera to take pictures of several samples, and also developed a standard curve, where I add known amounts of chemical to the test, and take pictures of the results to compare the color of the result of my sample to these standards.
What I would like to do, is develop an algorithm that creates a two-color scale. One color is the test without any chemical (green), and the other color is the test saturated with chemical (yellow). And then when I input a sample color, the algorithm gives me a % Yellow output.
I have seen people try to create a gradient between to colors, but never read of someone trying to place colors onto that gradient.
I am already able to get the RGB color values of all my samples, so the actaul algorithm is fairly independent of any programming language (although I am familiar with C, C#, VBA, and python).
Can someone point me to a resource to do what I want to do?
Thank you,
Michael