November 29, 2024, 07:40:27 AM
Forum Rules: Read This Before Posting


Topic: Can RBG be used to determine concentration?  (Read 1271 times)

0 Members and 1 Guest are viewing this topic.

Offline bio?kem?biokem

  • Very New Member
  • *
  • Posts: 1
  • Mole Snacks: +0/-0
Can RBG be used to determine concentration?
« on: November 02, 2023, 01:41:23 AM »
Is there any connection to be made between concentration and RBG values? I've noticed a trend between B and G and the concentration of cranberry juice but now I'm stumped! I have no idea how to make this a viable function. Any advice?

Offline Borek

  • Mr. pH
  • Administrator
  • Deity Member
  • *
  • Posts: 27863
  • Mole Snacks: +1813/-412
  • Gender: Male
  • I am known to be occasionally wrong.
    • Chembuddy
Re: Can RBG be used to determine concentration?
« Reply #1 on: November 02, 2023, 04:02:49 AM »
To some extent. Google for Beer–Lambert law.

As a first approximation intensity of the light is directly proportional to any of the RGB components. In practice it is more complicated.
ChemBuddy chemical calculators - stoichiometry, pH, concentration, buffer preparation, titrations.info

Offline prankster1590

  • New Member
  • **
  • Posts: 5
  • Mole Snacks: +0/-0
Re: Can RBG be used to determine concentration?
« Reply #2 on: November 02, 2023, 05:30:44 AM »
Is there any connection to be made between concentration and RBG values? I've noticed a trend between B and G and the concentration of cranberry juice but now I'm stumped! I have no idea how to make this a viable function. Any advice?

If you mean the graphic red-green-blue mixing than maybe. Concentration of what exactly. Sugar, vitamins, etc...
Cranberry juice absorbs a specific set of frequencies and reflects  everything else. Giving it it's color. The more concentratated the juice, the more it absorbs and reflect these frequencies. Making the color more dark and intense in color.

In beer brewing you have the lovibond scale to measure the color of the beer. Beer color comes from compounds called Melanoidins which are produced from maillard reactions during malting and brewing. The more concentrated it is the more dark the beer becomes. From light yellow to almost black.

In analytical chemistry they measure compounds by the absorption of monchromatic light. At a specific wavelength that is best absorbed by that specific compound 

Offline Corribus

  • Chemist
  • Sr. Member
  • *
  • Posts: 3551
  • Mole Snacks: +546/-23
  • Gender: Male
  • A lover of spectroscopy and chocolate.
Re: Can RBG be used to determine concentration?
« Reply #3 on: November 02, 2023, 10:00:09 AM »
Is there any connection to be made between concentration and RBG values? I've noticed a trend between B and G and the concentration of cranberry juice but now I'm stumped! I have no idea how to make this a viable function. Any advice?

In principle any metric can be used to determine concentration if a reproducible, quantitative correlation can be made between the metric and the concentration. This merely requires reliable concentration standards. If you have reliable standards for "cranberry juice concentration" (whatever that means) and there is a reproducible, preferably linear, trend in one or more of the RGB vector components, then sure you could use RGB measurements to determine concentration In principle. You don't have to be able to explain the relationship from a standpoint of basic physics to make this work. With the exception of some microscopy techniques, where you can go in and actually count particles, no measurements actually directly measure concentration - we measure other things that are proportional to concentration.

If you're looking for a first-principles relationship between RGB color values and concentration, that's a bit more difficult. In most laboratory measurements, the absorption of light by a sample is used. This is because there is, at least in low concentration regimes, a well-known logarithmic relationship between light absorption and concentration for most chemicals that absorb light of specific wavelengths. (The aforementioned Beer's Law). But, RGB and other color models attempt to quantitate the way colors are perceived, and perceived color depends on a number of processes that include absorption, reflection, scattering, and the quality of the incident light source. The RGB measurement standardizes some of these but the fact that multiple physical processes determine the color measurement, and each of these processes have different complex relationships to the concentration of the sample, it would be very difficult to disentangle these processes to understand their separate contributions to the color measurement or how these processes change as a function of concentration.

There's also the fact that light wavelength is a linear/1D scale whereas the color wheel is, well, circular/2D, and it's not always clear how to attribute what we call "color" to the fundamental properties of light - for instance, in the linear wavelength scale, we might call pure 450 nm light "blue" and pure 700 nm light "red"; in perceived color language, purple is considered a mixture of blue and red, but what wavelength is purple light? certainly not the halfway between 450 nm and 700 nm, or 575 nm, which looks orange to us.

Fundamentally the problem is that "color" is not really a physical quantity; it's a matter of perception. The best measurements are those that are based on single metrics that have obvious and straightforward physical relationships to what is being measured. As a practical matter, RGB values are also vectors, not single values, which would not be an ideal choice because it's not straightforward how you would build a calibration curve unless the components both have the same rate of change as a function of concentration. 

If you want to quantify cranberry juice concentration, you would be better off using a UV-Vis absorption measurement.
What men are poets who can speak of Jupiter if he were like a man, but if he is an immense spinning sphere of methane and ammonia must be silent?  - Richard P. Feynman

Sponsored Links