{"id":41954,"date":"2026-08-05T03:27:05","date_gmt":"2026-08-05T01:27:05","guid":{"rendered":"https:\/\/www.graviton.at\/letterswaplibrary\/self-promotion-250-world-flags-with-dominant-colors-extracted-from-the-svgs-ordered-by-reading-direction-json-csv-odbl\/"},"modified":"2026-08-05T03:27:05","modified_gmt":"2026-08-05T01:27:05","slug":"self-promotion-250-world-flags-with-dominant-colors-extracted-from-the-svgs-ordered-by-reading-direction-json-csv-odbl","status":"publish","type":"post","link":"https:\/\/www.graviton.at\/letterswaplibrary\/self-promotion-250-world-flags-with-dominant-colors-extracted-from-the-svgs-ordered-by-reading-direction-json-csv-odbl\/","title":{"rendered":"[Self-promotion] 250 World Flags With Dominant Colors Extracted From The SVGs, Ordered By Reading Direction \u2014 JSON\/CSV, ODbL"},"content":{"rendered":"<p><!-- SC_OFF --><\/p>\n<div class=\"md\">\n<p>Disclosure: I built this. It powers quizbandiere.it, my free flag quiz.<\/p>\n<p>Country datasets are everywhere; flag <em>colors<\/em> usually aren&#8217;t, and when they are they&#8217;re hand-written heraldic descriptions. I extract them from the rendered SVG: rasterize at 64\u00d748, classify pixels by hue, merge antialiasing shades, drop anything under 2.5% of the area, then order the result along whichever axis separates the color centroids most. So a vertical tricolor comes out left-to-right and a horizontal one top-to-bottom \u2014 Italy is <code>[\"verde\", \"bianco\", \"rosso\"]<\/code>, not sorted by area. Coats of arms and crosses fall back to area order.<\/p>\n<p>I built it to generate believable wrong answers in a quiz. It works well as a similarity key for &#8220;which flags get confused with which&#8221;.<\/p>\n<p>250 entries (195 independent states, 55 territories): ISO 3166-1 alpha-2\/3, official name, capital, region, area, borders, currencies, languages, TLD, calling code, emoji, colors, SVG URL.<\/p>\n<ul>\n<li>JSON: <a href=\"https:\/\/quizbandiere.it\/dati\/bandiere.json\">https:\/\/quizbandiere.it\/dati\/bandiere.json<\/a><\/li>\n<li>CSV: <a href=\"https:\/\/quizbandiere.it\/dati\/bandiere.csv\">https:\/\/quizbandiere.it\/dati\/bandiere.csv<\/a><\/li>\n<li>Docs: <a href=\"https:\/\/quizbandiere.it\/dati\/\">https:\/\/quizbandiere.it\/dati\/<\/a><\/li>\n<\/ul>\n<p>Served with <code>Access-Control-Allow-Origin: *<\/code>, so it works from a browser. The license and attribution are inside the JSON, not just on the page.<\/p>\n<p><strong>Limitations<\/strong><\/p>\n<ul>\n<li>Everything is in Italian, including the color names (<code>verde<\/code>, <code>azzurro<\/code>).<\/li>\n<li>Colors are perceptual, not official. No hex codes, no heraldic terms.<\/li>\n<li>No flag ratios and no historical flags.<\/li>\n<li>Derived work: base data is mledoze\/countries, I added the Italian layer and the color extraction. Contested names and borders are inherited from upstream, not adjudicated by me.<\/li>\n<li>Snapshot, not a feed. The <code>aggiornato<\/code> field tells you how stale your copy is.<\/li>\n<\/ul>\n<p><strong>License:<\/strong> ODbL 1.0 \u2014 not a choice, mledoze\/countries is ODbL and share-alike. Artwork is lipis\/flag-icons (MIT), re-hosted.<\/p>\n<p>Corrections welcome, especially on flags where the color order looks wrong. That&#8217;s where my pipeline is most likely to be quietly incorrect.<\/p>\n<\/div>\n<p><!-- SC_ON -->   submitted by   <a href=\"https:\/\/www.reddit.com\/user\/Luchil\"> \/u\/Luchil <\/a> <br \/> <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1vfs1ed\/selfpromotion_250_world_flags_with_dominant\/\">[link]<\/a><\/span>   <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1vfs1ed\/selfpromotion_250_world_flags_with_dominant\/\">[comments]<\/a><\/span><\/p><div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-41954 jlk' href='javascript:void(0)' data-task='like' data-post_id='41954' data-nonce='16e453a5c1' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.graviton.at\/letterswaplibrary\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-41954 lc'>0<\/span><\/a><\/div><\/div> <div class='status-41954 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Disclosure: I built this. It powers quizbandiere.it, my free flag quiz. Country datasets are everywhere; flag colors&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-41954","post","type-post","status-publish","format-standard","hentry","category-datatards","wpcat-85-id"],"_links":{"self":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/41954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/comments?post=41954"}],"version-history":[{"count":0,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/41954\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/media?parent=41954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/categories?post=41954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/tags?post=41954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}