Flag Colors

Find out which flag colors are most common in different parts of the world.

Run the code to get the flags of Europe. Try other regions, like south america or northern europe:

SHOW/HIDE DETAILS

Get an Entity that represents the countries of Europe. Type += to get a natural language input box and type europe. Run the code with +:

In[1]:=
X
Out[1]=

Get the names of the countries of Europe:

In[2]:=
X
Out[2]=

Get images of the flags of the countries and give them the name flags:

In[3]:=
X
Out[3]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Get the dominant colors of the flags:

Note: run the code in the previous step first.

SHOW/HIDE DETAILS

This is the flag of the first country in the list, Austria:

In[1]:=
X
Out[1]=

Get its dominant colors:

In[2]:=
X
Out[2]=

Get the dominant colors of each European flag by mapping DominantColors over the flags list:

In[3]:=
X
Out[3]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Plot the colors. Try different point sizes:

SHOW/HIDE DETAILS

A chromaticity plot shows the positions of colors in a color space. Related colors are close together. Rotate the graphic with the mouse to see how the colors cluster in the color space:

In[1]:=
X
Out[1]=

Make the colors easier to see by increasing the size of the points:

In[2]:=
X
Out[2]=

White colors in the plot dont show up on a white background. Make the background light gray so you can see them:

In[3]:=
X
Out[3]=

Add the RGB color space gamut, which shows the range of possible colors, to the plot:

In[4]:=
X
Out[4]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Share ItMake a website that shows a countrys flag and its dominant colors:

SHOW/HIDE DETAILS

Heres how to use Column to display a countrys flag with its dominant colors underneath:

In[1]:=
X
Out[1]=

Deploy a form that asks for a country and displays that countrys flag and its dominant colors:

In[2]:=
X
Out[2]=

Click the link in the output to visit the site.

Share the link by right-clicking it and choosing Copy Address. Paste the link into an email, tweet, or other message.

HIDE DETAILS
In[1]:=
X
Out[1]=