File Exchange

image thumbnail

Color Checker Chart

version (3.9 KB) by Image Analyst
Synthesize a perfect version of the X-Rite Color Checker chart.


Updated 19 Sep 2012

View License

The X-Rite Color Checker Chart is a very common standard used for standardizing different images and imaging systems. (This chart has been known in the past as the Gretag Macbeth ColorChecker Chart,
and the Munsell ColorChecker Chart.) You can take a photo of one chart and a different photo at a different time or on a different system, and then develop a transformation to match the two images based on the colors of the chart's chips.

This script makes (synthesizes) a perfect X-Rite Color Checker Chart from the X-Rite supplied sRGB values. (Note: This script just creates a nice perfect image (which you can save) so it can't be used for standardizing two different images or imaging systems. It's just for looks, for example to put in a publication.) You have options on the size of the image, whether you want informational text (chip name & color) in the overlay, and whether you want to save the image.

Cite As

Image Analyst (2020). Color Checker Chart (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

bindhu a

Pengfei Wang

Dear Image Analyst
Great job, thanks for sharing, this is very useful for color analysis.
Actually, I have two more questions.
Firstly, when evaluating the color accuracy of cameras, a colorchecker chart will be captured, my question is how to get these pixel value with gui-programming in matlab?
Another question is about color correction, say that most popular ISP gives a 3x3 RGB to R'G'B' transformation, I've tried polyfit, regress to derive such matrix, neither of them showed confident results, the average color difference is too high, about 8 deltaE, do you have any suggestion to optimize the fitting process?
Thanks a lot!



thank you very much

liu liu



Found this, and thought "Oh, this is great! Gives me ideal RGB values - now I just need to modify the script to remove the text, and then figure out how to save it off as an image". Amazingly, the first time I ran, I found these features to be already implemented! Prompted me first to generate it with or without text, then asked me if I'd like to save it. Perfect! Thank you!


Hi Image Analyst. I'm a student currently working on a project that involves detecting the presence of certain colors within images all taken under the same lighting conditions. I've been learning a lot from your Simple Hue Detection code, but am finding that I'm having trouble getting constant values for each color in different pictures (specifically dark brown, light brown, red, blue-grey, black and white). I've decided to use a color checker chart, but don't know how to fully use it to modify my images. Currently I'm using a modified method of the masks that you used for your yellow color detection that can successfully detect each color, but only for a narrow range of images. If you could, can you explain how I could use the color checker chart (a physical one) to modify the color in an image?

Thanks for this helpful submission! Just what I needed.

Tim: I'm quite aware of color science. I teach color courses around the world, take color courses, and attend professional society symposia on color where I talk with top experts in the world. I'm one of the top color scientists in one of the largest corporations in the world. I develop calibrated color imaging systems full time, all the time. I think you misunderstood the intent of this submission, which was to simply create an image using the X-rite supplied values of their Color Checker chart. Nothing more. No one who images a real chart should expect to get the sRGB values. No one would be able to use this image for any calibration or anything at all other than creating a synthetic image, which is all it's meant for. I'm sorry you expected more, despite my disclaimer in the second paragraph of the description, and gave it the lowest possible rating.

Tim Zaman

No, no, no, NO. You cannot state R,G,B values for such targets, "Image Analyst". The RGB colorspace is HIGHLY non-perceptually-uniform. Conversion to LAB would make it as perceptually uniform and standardized as you can get these days. And yes, you state that you use the sRGB values, but which sRGB whitepoint do you use? What observer degree? And so on. Convert your image to the appropriate LAB values and take the color space into consideration. Then compare LAB values.



I'm really impressed with your contribution . gr8. Thanks for sharing.

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: export_fig

Inspired: Convert between RGB and Color Names