Apps Part of Cartograph

Cartograph Flag Finder (find a flag by its colours and layout)

Saw a flag and don’t know whose it is? Pick its colours, stripes and symbols to find the country.

Colours in the flag
More options
Layout and symbols
Colours that are NOT in the flag

Try an example: · ·

More about this tool

How it works

Finds the flags of 197 countries by their colours (red, dark red, orange, yellow, green, blue, light blue, white, black), their layout (horizontal, vertical or diagonal stripes, cross, saltire, canton, hoist triangle, border) and their symbols (disc, star, crescent, sun, coat of arms, writing, map, Union Jack, animal, plant, weapon), optionally with the number of stripes and a region. Every flag gets a score from 0 to 100; the best matches are shown with their flags. It is the flag-finder engine of the Cartograph app.

  • Colours: every flag picture (flag-icons SVG, 4:3) was drawn once at 200 × 150 pixels and each pixel assigned to the nearest of nine named colours in CIELAB. Colours covering at least 3 % of the flag are its main colours; 0.8–3 % count as small details (emblems, outlines).
  • Layout and symbols: tags curated for every flag and checked against the flag descriptions of The World Factbook; the stripe count is measured at the fly edge (horizontal) and near the top (vertical).
  • Score: each wanted colour counts 1 when it is a main colour, 0.6 when a close colour is (red ↔ dark red/orange, blue ↔ light blue, yellow ↔ orange) and 0.35 when it only appears in details; each wanted feature 1 (0.5 for a close one, e.g. cross ↔ saltire, disc ↔ sun); the stripe count 1 when equal and 0.4 when one off. The sum is divided by the number of wishes; extra main colours cost a little (more with “only these colours”), excluded colours cost 0.5 each.
  • Results are sorted by score, then by English name. Flags are shown in the 4:3 drawing of flag-icons; official proportions differ for many countries.

Sources

Part of Cartograph

  • Cartograph Map posters, route art & atlas

    Map prints, GPS-art routes, fair meeting points, true sizes, flags and country quizzes.

    Open Cartograph

Related tools

How to use the Cartograph Flag Finder

Saw a flag on holiday, in a film or at a stadium and don’t know whose it is? Pick its colours, stripes and symbols to find the country.

What it is for

You remember a flag only roughly: “blue with a yellow cross”, “red and white with a crescent”, “three vertical stripes, something green”. The Flag Finder turns that memory into a ranked list of the 197 country flags: the 193 UN members, the Holy See, Palestine, Kosovo and Taiwan.

You pick the colours you saw, the layout (horizontal, vertical or diagonal stripes, a cross or diagonal cross, a box in the corner, a triangle at the pole side, a border) and any symbols (disc, star, crescent, sun, coat of arms, Union Jack, map, writing, animal, plant, weapon). You can add the number of stripes, colours that were definitely not there, and a region. Every flag gets a score from 0 to 100, and the best eight are shown as pictures.

Worked example

Blue and yellow with a cross gives:

Worked example
RankCountryScore
1Sweden100
2Kosovo67
3Ukraine67
4Barbados63

Kosovo and Ukraine have the right colours but no cross, so they lose a third of the points.

Red and white with a crescent and a star, with Only these colours ticked, puts Singapore, Tunisia and Turkey level at 100, followed by Algeria at 75. Algeria has the crescent and star too, but its green half costs points because you asked for red and white only.

The tool’s own example, red, white and blue in three vertical stripes, puts France first with 100 and Andorra second with 92.

How to read the result

The score is the share of your wishes a flag fulfils. A colour counts fully when it covers at least 3 % of the flag, and partly when only a close colour does (dark red for red, light blue for blue, orange for yellow) or when it only appears in a small emblem. Layout features count fully, or half for a close one: a diagonal cross for a cross, a sun for a disc. Extra colours you did not pick cost a few points, more with Only these colours. Excluded colours cost half a wish each.

The Missing column tells you which wishes a flag does not meet, so you can see quickly whether your memory or the flag is the problem. Open in the app takes the same search into the Atlas tab of Cartograph, where you can click a flag to see its fact card.

Tips and common mistakes

  • Start with two or three colours and one feature. Every extra wish narrows the list; a wrong one pushes the right flag down.
  • Dark blues sometimes count as black and mid blues as light blue. If a flag is missing, try the neighbouring colour.
  • Count stripes on the side away from the pole: emblems near the pole break up the stripes there.
  • Use Colours that are NOT in the flag when two families look alike, for example to separate the red-white-blue tricolours from those with yellow.
  • The pictures are 4:3 drawings. Real proportions differ (Switzerland and the Holy See are square, Nepal is a double pennant), and a few flags are drawn without their coat of arms.

FAQ

Where do the flags come from?

The pictures are the open flag-icons collection (MIT licence). The colour shares were measured from those pictures; the layout tags were written by hand and checked against the flag descriptions of The World Factbook.

Why does a flag with all my colours not score 100?

It probably lacks a layout feature you picked, or has the right colours only in a small emblem.

Does it know regional or historical flags?

No. Only the national flags of the 197 countries are included, as flown today.

Can I use it from a script?

Yes. The JSON API and MCP tool return the same ranking as the Cartograph app.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://cartographflagfinder.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://cartographflagfinder.usefulweb.site/mcp · tool name cartograph_flag_finder
Example request
curl -s -X POST https://cartographflagfinder.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{"colours":["red","white","blue"],"features":["vstripes"],"bands":3}'
Feedback · ideas & bug reports welcome