I have a tool where I point it at something, and it gives me an RGB value. I want to add universal indicator to a liquid, measure the RGB value and input it into the site to find the pH. Does anyone have any ideas?
Your best bet would be to prepare 15 solutions of buffers at pH 0, 1,.. 14 and calibrate your instrument. Dip three different test papers in each solution, get average numbers. Normalize colors and see the r/g, r/b, and g/b ratios for each pH. Now you can just make a long if statement in excel and plug your measured numbers there.
Fill excel with 15 statements like
=if(r/g > 5 and r/g <8 and r/b>3 and r/b<3.5; "pH=3"; "")
Also, many pH papers come with a map of colors for each pH. you can use that for calibration.
The thing is, chemists use pH meters when they need accurate readings. accuracy down to mili-pH is achievable. pH meters are build on very different principles and are reasonably priced.