I have several recessed LED lamps that I'd like to assess for color temperature so I can purchase replacements. The lights are advertised as having a "color temperature" of 2700K and 3000K among others (example here). Is there a way to detect the color temperature from a photo or the lamp, perhaps by taking a photo side-by-side with a grey card?
You camera has a "Custom white balance" and will display the corresponding color temperature(*): take a picture of a gray chart or equivalent, apply custom white balance, check the result temperature.
You can set arbitrary color temperatures in the camera's WB: shoot a series of pictures of a grey chart over a range of temperature settings, check which picture is the most neutral (R=G=B).
Edit: testing method #2
It turns out that my camera will display RGB histograms, so there is no need to transfer the pictures to a PC to check things out, everything can be done with the camera display.
So, a quick test with my bed lamp, shooting my color reference, changing the color temperature (which is conveniently add to the display):
The green histogram doesn't move, but the red and blue one eventually get aligned at 2700K.
Coincidence? This is exactly what the lamp markings say:
Edit#2: further tests
- two lenses:
- Canon 35mm IS STM (the one used above)
- Sigma 17-70mm
- two fluorescent lamps:
- the 2700K one used above
- a "Cold daylight" one (no markings on the lamp, but rated 6700K on the box).
- Both lenses produce the same TC readings
- Accuracy at the other end of the spectrum is worse, the camera has to be set to 7800K to align red and blue histograms.
- At the high end of the spectrum (8000K) a wide variation of the TC settings results in minute histogram shifts, while at the low end (2700K) a single step (100K) has a very visible effect, so the inaccuracy at the higher temperatures would not be that much of a problem, lamps with a 500k difference wouldn't make that much difference in the rendered colors.
(*) Not my Canon 70D, unfortunately
In order to fully compare the light output of two sources, one must consider both the temperature (Blue ←→ Amber) and tint (Green ←→ Magenta) of the light a source emits.
Measuring color temperature alone will not tell you all of the differences between two light sources. Color temperature is but one axis in color space that includes the colors emitted by black body radiators when heated to specific temperatures expressed in degrees Kelvin. The glowing gases on the surfaces of stars, for example, are black body radiators. So are most metals when heated until they begin to glow, then melt, and finally turn to vapor if heated hot enough.
Most natural light sources emit light only along this Blue ←→ Amber axis. But other light sources can also have a strong "tint" along the Green ←→ Magenta axis in the light they emit. For example, the LED lighting currently used for stage illumination in a lot of small night clubs can have a much more magenta tint to it than a black body radiator will emit at any temperature. Typical old style fluorescent lights, on the other hand, emit a much greener tint than a black body will radiate. This "tint" axis is more or less orthogonal to the "color temperature axis/curve in color space charts.
So how do I measure the total white balance of a light source using a camera?
One way to do it is to take a photo of a color neutral object such as a "gray card" and save the raw data collected by the sensor. Then open the raw file in a raw conversion application, such as Lightroom, and adjust the color temperature and white balance correction values until the RGB values, represented by numbers such as (228,247,218) are all equal (233,233,233). The color temperature of the light source is whatever CT value, expressed in degrees Kelvin, you are using on the CT adjustment. The tint of the light source is indicated by the amount of Green ←→ Magenta correction applied. With Canon's Digital Photo Professional, which is what I often use to process raw files, each unit of Green ←→ Magenta correction represents a five Mired color correction filter.
Another method would be to use the EXIF info included in the 'Maker Notes' section of many cameras to see the Red, Green, and Blue measured values used by the camera to make a color neutral object appear color neutral in the resulting photograph. To do so take a photo of a color neutral object that fills the frame. Then set the camera's "Custom White Balance" option to use the photo of the color neutral object as a reference. Once you've done that, take another photo of the same color neutral object under the same lighting. The color values used to produce the second image can then be used to calculated the color temperature and tint of the light source, but that involves a lot of transformational math that is probably beyond the scope of an answer here.
Not very many applications that show EXIF data will display that information in the EXIF data, though. Some raw convertors will open raw files using that value in the EXIF info as the default value if the selected options for opening raw files specifies to use camera calculated WB. Among the tools I routinely use, it isn't displayed. But if I upload an image taken with my Canon EOS 5D Mark III to Flickr and allow the EXIF info to be displayed, anyone can click on the "Show EXIF" link and then scroll way down to see it.
Here's a piece of a screen shot from a portion near the end of the EXIF info for this image at flickr:
Notice that the "Color Temperature Auto" and "Color Temperature Measured" values are identical. That indicates that when the camera is set to "Auto WB" the measured values for Red, Green, and Blue are used to calculate the color temperature and tint that are then applied to the processed image (either the jpeg preview attached to the raw file, or a jpeg image).