How To Measure Colors Properly - Spectrometry - Title Image

Spectrometry – How To Measure Colors Properly

In this post in the wonders of colors series we define a reliable method to measure the different colors and explore the spectrometry concept.

Every now and then you may get into an argument with your friends or colleagues on whether an item is green or yellow, or whether the wall is white or cream-like colored. How do we measure color accurately and objectively to avoid these kinds of arguments?
In this post, in our wonders of colors post series, we will explore the concept of spectrometry, its uses and some simple applications of it. It is a short but necessary intermission from our “top-model pups” (Smiley) we introduced in the first post in this series as we will explore in depth the spectral content of our light sources further along this post series.

Throughout this post, please note that I will use the term spectrometry for optical-spectrometry and this not to be mixed-up with mass-spectrometry or any other kind of spectrometry. In addition, the spectrograph, spectroscope and any other kind of spectrum analyzer will also be referred to as spectrometer since in their core technology they are all more or less the same.

What Colors are and the Concept of Spectrometry

The human eye is sensitive to light in the wavelength range between 400-700nm. Our perception of color is simply the mix of these wavelengths in the scene we have in front of us. I assume that if you have read my posts, none of it was new to you Smiley. In truth, everything that is described here may be applied to any wavelength and not just VIS light, but let’s face it, our lives are in VIS light and showing examples in IR are much less intuitive than VIS.
Spectrometry is the measurement of the existing wavelength in the light we examine.

To make spectrometry work we must apply some kind of a differentiation method between the different wavelength such that our sensing system, be it our human eye, a camera sensor or any other kind of sensing method, will be able to tell that difference. We can differentiate the different types of spectrometers by that differentiation method.

Filters

Spectrometry by filtering is as basic as it sounds. We place a filter in the optical path of our examined light. If the light passes the filter, then at least some of its contents is that particular wavelength range. The accuracy of such spectrometer methodology will be proportional to how narrow the bandwidth of the color filter is.

The most common day-to-day “spectrometer” we use, without even knowing it is one, is a color camera which is in its essence a filter spectrometer. Light arrives to our sensor and we get in the camera’s grey level scale how much red, green and blue exists in that light.

Obviously, a spectrometer that is based on filtering will never be an optimal device because there are always limits as to the number of filters we may apply to the light systematically; the bandwidth of each filter cannot, beyond a certain point, go narrower and the filters need to be applied to the examined light one at a time. So, if we do not want to have the system test each filter sequentially, we would need some kind a method to split the light evenly between the filters, a task that for the higher end of accuracy levels may be no less complicated than the filtering itself.

Spectrometry via filtering has its advantages. When your application searches for the existence of a single wavelength and nothing else then filtering is the way to go.

Color Filters

Dispersive Prisms

Dispersion is the phenomenon where each wavelength experiences a different physical property that causes the bundle of wavelengths to be physically differentiable by that physical characteristic (phase, speed, angle etc.). A dispersive prism is an optical element that stretches each wavelength in a polychromatic light to a different angle. It is based on a material that has different refractive indices for different wavelengths and the shape (triangle for example) of that element is designed such that each wavelength in the incident light will enjoy a different path and end up in a different location in space.

BTW, the measurement unit for how dispersive a material is, is termed the Abbe number; they higher the Abbe number is then the less dispersion we experience, so dispersive prisms will use materials with very low Abbe numbers.

In this case, we point our beam of light into the prism and measure the intensity of each wavelength in the output.

Dispersive Prism

Diffraction Gratings

Diffraction grating is the next level of color dispersion. A diffraction grating in short is a grating with distance d between its grooves or slits. The light then experiences diffraction effects and causes the light to experience direction shift. When polychromatic light is introduced, each wavelength will experience a different angle shift that is dependent on the angle of incidence and the distance d. A future post of mine will be dedicate solely to diffraction and diffraction gratings since there are a lot of ins and outs as to their use and the many different applications of diffraction gratings.

Below is a conceptual diagram of transmissive diffraction grating.

Diffraction Grating

Diffraction gratings allow better control over the spatial separation of the different colors which in turn allows for better accuracy in our color measurement application.

The following link demonstrates a very unorthodox way to create diffraction gratings out of sugar and chocolate.

Calibration

By far the most challenging aspect of color measurements is the calibration of the measurement device. When we spread the visible 400-700nm range over a sensor with 300 pixels we would like to have a degree of certainty that pixel #150 corresponds to wavelength 550nm.

As with every calibration in engineering the quality of the calibration depends on the scale. In our case, highly accurate spectrometers use calibration lamps and laser emission. Lasers will have a very narrow and well-defined wavelength emitted from the unit. For example, to calibrate a point in our red zone a He-Ne laser that will emit at 632.816nm in air could be used, (be careful of semi-conductor lasers that have wavelength – temperature dependency). Calibration lamps such as HG(Ar) or Xe are more useful for the purpose since these lamps have a set of narrow lines of wavelengths and multiple zones in their spectrum and thus facilitate calibration using one light source.

However, let’s say for example we would like to identify color changes in our colored plastic production line, we do not have to get into the exact wavelengths in our system. For such applications, with a very accurate sample and adequately repeatable light we could also calibrate any standard RGB camera to be our required color measurement device since, it is not the actual wavelengths involved that are of interest in such application but only the repeatability of a certain color mixture.

This leads to the notion that sometimes in the process of calibrating your device you may reach the conclusion that your device is not what your application really needed.

Spectrum Analyzer – Laboratory Version

Enough theory!
To build a simple laboratory version of a spectrometer for the purpose of this blog I used the Allied-Vision-Technologies Alvium 1800 U-158 Color camera (Sony IMX-273 sensor integrated inside) with an OPT-C1618-5M imaging lens as my sensor array. The use of the color camera will ease the presentation where the red color is in the image and where the blue is in the image. The AVT camera was provided by courtesy of OpteamX.

Lab Version Spectrometer Setup

In the first setup I would like to demonstrate, for my reflective diffraction grating I simply used an old CD (optical compact disc. Yes, I still have those Smiley). The diffracted reflected light was directed into the camera lens and a black material was placed in front of the diffraction grating.

Let’s look at the following spectrum from a white LED flash light source:

Optical CD Diffracted Light Pattern - Flash Light

Beautiful, isn’t it? In the vertical axis we get the color differentiation, the lower in the Y axis the lower the wavelength (blues at the bottom).

We can clearly see that the flash light is made of a row of pairs of mini light sources, each has all the ranges from purple to red. The CD diffractive pattern is not straight, which explains the arc shape of the light sources in the image.
We may also see in the image that the power of blue or green in the light is stronger than that of the red, what may be referred to as “cold light”.

Let’s look at another LED based white light source in the same setup:

Optical CD Diffracted Light Pattern - Cold Light

Here we see that this light source is even colder!
However we are not here to discuss light sources, we’ll leave that to another post. We are here for the spectrometer. So as much as the CD gave good results, let’s replace the CD with a 600l/mm diffraction grating and see what these two light sources look like:

600l/mm Diffraction Grating Diffracted Light Pattern - Flash Light
600l/mm Diffraction Grating Diffracted Light Pattern - Cold Light

On top we have the flash light and, on the bottom, we have the cold light. The spread is essentially the same as what we saw when we diffracted the light with the CD, however you may see that the stretching is more elegant.
Note that this diffraction grating had inverted color spread, so the blues are on top in the Y-axis and the reds are in the bottom.

And finally, just for the fun of it, let’s take a Hg(Ar) lamp as a light source. A Mercury lamp has strong peaks at 435nm blue, 546nm greenish-yellow and the yellow 576nm and 579nm lines. These may be seen nicely in the image to the left. The lamp has also two very weak lines at 404 purple and 696 red. These can be seen with a very large zoom-in of the same image (to be frank, I could only find these in the diffraction 2nd order image, where the other colors are subsided), on the right – use a dark scene on your screen to properly see it:

There’s a lot more to it of course. You may have noticed that in the 600l/mm diffraction grating images the white light colors are not exactly lined up in the Y-axis, which of course may be corrected. When we go deeper and require more accuracy from our device the optics behind the light path starts making a difference – a lot of difference. However, as you all may well remember, know your system requirements and make a system to comply, so for the purpose of this wonders of colors post series this spectrometer setup was more than enough.

This post laid out the basic concepts of spectrometry. Beyond being an interesting issue by itself, this measurement setup will be used in future posts to demonstrate the contents of the light when it will be required. And above all, let’s admit it, the rainbow images are cool enough to deserve the main stage Smiley.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top