Skip to content

Conversation

@aplaice
Copy link
Collaborator

@aplaice aplaice commented Sep 17, 2025

This is meant as an aide to determine whether two flags are similar or not. It does not replace visual comparison, but it does replace the extracting colours from the SVGs and inputting them into the ΔE* spreadsheet.

Testing (not systematically) it seems that the script correctly regenerates the colour difference values we had obtained with the spreadsheet:
https://github.com/anki-geo/ultimate-geography/wiki/Flag-similarities

(Approximately: we use a slightly different conversion factor from the reference spreadsheet, but I believe that our factor is the correct one.)

Writing the script turned out considerably more time-consuming than expected at the outset, due to increasing numbers of edge-cases...

The script is messy and I'm not sure whether anyone other than myself will find it useful, but given that it's been written, having it is IMO better than not having it...


In the cases where there are few colours, it works well:

image image

but when there are many, it becomes messy:

image

@aplaice aplaice force-pushed the flag_similarity_script branch from 55fcd3d to f974858 Compare September 17, 2025 08:12
Copy link
Collaborator

@axelboc axelboc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that's quite impressive. Definitely better than a spreadsheet... No notes 😀

This is meant as an aide to determine whether two flags are similar or
not.  It does not replace visual comparison, but it does replace the
extracting colours from the SVGs and inputting them into the ΔE*
spreadsheet.

Testing (not systematically) it seems that the script correctly
regenerates the colour difference values we had obtained with the spreadsheet:

https://github.com/anki-geo/ultimate-geography/wiki/Flag-similarities

(Approximately: we use a slightly different conversion factor from the
reference spreadsheet, but I believe that our factor is the correct
one.)

Writing the script turned out considerably more time-consuming than expected at the outset, due to increasing numbers of edge-cases...

The script is messy and I'm not sure whether anyone other than myself will find it useful, but given that it's been written, having it is IMO better than not having it...
@aplaice aplaice force-pushed the flag_similarity_script branch from 835aa31 to ffa289e Compare September 30, 2025 10:55
@aplaice aplaice merged commit 96c9bcd into anki-geo:master Oct 6, 2025
1 check passed
@aplaice aplaice deleted the flag_similarity_script branch October 6, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants