It’s World Statistics Day! To honor the theme of the day, the JMP User Community is having conversations about the importance of trust in statistics and data. And we want to hear from you! Tell us the steps you take to ensure that your data is trustworthy.
Choose Language Hide Translation Bar
Staff (Retired)
What color is The Dress? JMP can tell you!

The Internet was abuzz last week over a picture of a blue and black dress. Or was that a white and gold dress? That was the question. What color is that dress? Well, as a guy, my immediate response was, "Who cares?" What I wanted to know is: Is that dress on sale? How much is this viral fashion going to end up costing me? But then, as a software developer who does image analysis, I also thought this phenomenon was really cool. How is it that people see the same dress as very different colors? Can I use JMP to tell me why? Can JMP tell me what the actual colors are?

About a month ago, I wrote a JMP script called Image Analyzer, which you can download from the JMP File Exchange (requires a free SAS profile). You can run the script and select an image. The image will be read into JMP and displayed in a window, and a data table will be generated, where each pixel in the image is represented by a row of data in the table. Each row contains an x and y value, which is the location of the pixel in the image; red, green and blue values representing the color in the RGB color space; an intensity value; and hue, lightness and saturation values representing the color in the HLS color space. The unique thing about this new script over others I have written in the past is that this script will keep a connection between the image and the data table so that selections in one will be reflected in the other. In fact, you can run an analysis in JMP, and the graph, the data table and the image will all show the same corresponding selected data.

So let's try the script out with the dress.


Now that I have read in the image and created a data table, I can do some analysis. My colleague, Craige Hales, was also interested in analyzing the dress, and he started by using Clustering. If I select Analyze->Multivariate Methods->Cluster, I get the following graph:


The Cluster analysis would indicate three distinct clusters, which I have identified with a 1, 2 and 3. Selecting each cluster individually shows the corresponding pixels in the image. I have shown each of the three images also with the same labeling. Notice that cluster 3 does not highlight any pixels in the dress, but rather it identifies areas in the background. That would mean that the dress is actually made up of two fairly distinct colors.

But what are the actual colors? For that, let's look at the actual color values in the data table. Often when working with color, it is beneficial to look at the colors in the HLS color space instead of the RGB color space. So this time, I use Analyze->Distribution and select H, L and S as my distribution columns.


From the Distribution, the Hue (H) again identifies two very distinct colors. Since the HLS values are in a normalized color space, I can interpret the value of 0.65 to be, in fact, blue. Similarly, I can interpret the value of 0.1 to be gold. So that would explain why people see blue and gold in the dress. But why do people usually see either blue and black or white and gold and not just blue and gold? The answer to that lies in the other two Distributions, lightness (L) and saturation (S).

If we select the bars for the Hue indicating a blue color, we see that the lightness values are mostly above the mid-range, while the saturation values are typically around the 20 percent range, maxing out at about one-third. A low saturation means there is not a lot of color present, but rather it is muted by gray. And a mid- to higher lightness value would indicate that the gray color is closer to white. So someone who focuses on the hue would see blue, whereas someone who is more influenced by the lightness and saturation would see white.


Similarly, we can do the same for the other color. We can select the bars for Hue indicating a gold color. We see a similar pattern for the saturation, indicating the color is muted by gray. But this time, the lightness is predominantly low, indicating that the gray value is closer to black than to white. So someone who focuses on the hue would see gold, whereas someone who is more influenced by the lightness and saturation would see black.


What is interesting is that one group of people seem to be influenced by the lightness and saturation. This causes the blue to appear as white and the black to appear as gold. The reverse is true for the other group. They appear to be able to filter out the light and focus more on the hue and correctly see the blue and the black.

I have to admit that I am one of those people who clearly see white and gold even though the manufacturer of the dress has indicated it is really blue and black. What colors do you see? And, more importantly, have you found it on sale (in case my wife asks)?

Article Labels

    There are no labels assigned to this post.


Brandy wrote:

LOL. Love it John. #teamwhiteandgold and husband is all #teamblackandblue. My brain can't understand!!!!


Elizabeth wrote:

I guess I'm a hue person. I saw blue and gold. Never saw either the blue/black or white/gold until people color corrected in each direction.

Very cool analysis!


Emil Friedman wrote:

The perceived color of an object also depends on the ambient lighting. Edwin Land demonstrated all sorts of neat things to the incoming MIT freshman class in 1964. One of them was that two pieces of clothing could appear to be the same color under one then common lighting conditions but not under another. Another was that one could get pretty good color slide rendition with only two dyes instead of the usual magenta, cyan, and yellow.


Deborah Upchurch wrote:

Wonderful blog John! Love the very detailed description of how you reached your analysis! Thank you for making this subject so much fun to analyze in JMP!


Shannon Conners wrote:

Thanks for sharing your add-in and observations, John! I saw gold and white in the original image and was initially puzzled as to how others saw it differently. This whole thing made me wonder if there is underlying genetic variation in the population that influences whether we focus on hue or lightness and saturation.


Teresa Obis wrote:

Very coold and nice blog!!! Thanks for share.

I always have thought that the people did not have to see the same colors. I will confess to you that I am unable to remember some colors. That gives me an explanation of the situation.

About the color of the dress, is it not possible the color you see depends of the brightness of the device used to see the image?

Staff (Retired)

John Ponte wrote:

The interesting thing with a picture is that it does not contain any information about the lighting it only contains the effects of the lighting. You do not know if the lighting is indoor or outdoor, fluorescent or sunlight, ambient or direct. When analyzing the picture, you have nothing to work with except the pixel values. But when you break the color down to hue, lightness and saturation, you can begin to understand what Edwin Land demonstrated.

Staff (Retired)

John Ponte wrote:

I would certainly agree with that. In fact, I have two monitors on my computer and when I moved the image from one monitor to the other, the colors changed. On my second monitor the blue, which I always saw as white, actually became more blue. That is the only time the white actually looked blue to me.


Simon Dennis wrote:

A Million words...

Hmmm.... if fashion be art then here be the science of art!

So if a picture is worth a thousand words....and if the correct answer is a "pantone" number...

The CORRECT number must be worth a million words....or just 42?

OK, Off to choose a tie for work......blimey!


Martin Demel wrote:

Wonderful! Now I have a reason to share with my wife why some colors appear different to me than to her. I see clearly Gold and cannot clearly decide between blue and White. To me it's like you have washed that white/gold shirt in a washing machine accidently with something blue and that's the outcome ;)


PaweÅ Olas wrote:

Very interesting, but I have one question. In your conclusion, you write "What is interesting is that one group of people seem to be influenced by the lightness and saturation. This causes the blue to appear as white and the black to appear as gold". However, in the text, hue gives blue and gold, and l+s gives white and black. So is it that some people focus on the hue of the blue and the lightness/saturation of the black and vice-versa or what? Hue alone gives blue and gold and it seems that noone sees that particular combination.

Staff (Retired)

John Ponte wrote:

Well, I don't know that you can use this as the definitive answer. It is more my observations and hypothesis. But if it saves a marriage, then it was worth the effort.

Staff (Retired)

John Ponte wrote:

Sorry, I didn't explain that very well. I think it is basically about filtering out light. The l+s show white and black but not to the same people. The people who filter out the light will see black, instead of gold, but by filtering out the light they will also see blue, instead of white. So they are in the blue/black group. Conversely, for the people who have more trouble filtering out the light, they will see white but, because of the light, they will also see gold. So they are in the white/gold group. At least, that is what it seems like to me after breaking down the colors.


Data Viz News [83] | Visualoop wrote:

[â ¦] What color is The Dress? JMP can tell you! | JMP Blog [â ¦]


Chris Kirchberg wrote:

Oddly, I see Blue and Gold (or greenish gold) as the two colors. Not Black and Blue or White and Gold. I am also a little red/green deficient, so I wonder if that has a play.

Staff (Retired)

John Ponte wrote:

Others have told me they see blue and gold as well. Interesting that you see greenish gold. In a red, green, blue world (such as a computer screen) gold is made up of red and green. Perhaps you are a little more red deficient than green deficient?