Sen descrición

Kirk Trombley 2b3a2e0e74 Install colorspacious %!s(int64=3) %!d(string=hai) anos
.gitignore 7ca6f6cf28 Ignore big-pngs dir %!s(int64=3) %!d(string=hai) anos
README.md 0d047c1960 Split up README, add more math docs %!s(int64=3) %!d(string=hai) anos
convert.py 3af774f436 Misc cleanup %!s(int64=3) %!d(string=hai) anos
database-luv.csv 8231b34d4c Generate dbs from big pngs %!s(int64=3) %!d(string=hai) anos
database.csv 8231b34d4c Generate dbs from big pngs %!s(int64=3) %!d(string=hai) anos
database.js 8231b34d4c Generate dbs from big pngs %!s(int64=3) %!d(string=hai) anos
explore.py 3af774f436 Misc cleanup %!s(int64=3) %!d(string=hai) anos
ingest.py c81f5bbd2f Update ingest logic to take arbitrary dir %!s(int64=3) %!d(string=hai) anos
math.md 691aaa1c48 Fix up math docs %!s(int64=3) %!d(string=hai) anos
nearest.html a540667339 Fix form submit weirdness %!s(int64=3) %!d(string=hai) anos
nearest.js a540667339 Fix form submit weirdness %!s(int64=3) %!d(string=hai) anos
nearest.py d5a4312a49 Reformatting %!s(int64=3) %!d(string=hai) anos
pngs.md 0d047c1960 Split up README, add more math docs %!s(int64=3) %!d(string=hai) anos
requirements.txt 2b3a2e0e74 Install colorspacious %!s(int64=3) %!d(string=hai) anos

README.md

Pokemon Color Search

Utility for quickly finding pokemon by the sprite's "distance" from a given color.

See also explanations of the underlying math and which images are used.

Included Files

  • nearest.py provides multiple options for finding pokemon "near" a color. No external dependencies, but database.csv must be present and populated.
  • ingest.py generates database.csv which is needed for nearest.py, database-luv.csv which is an alternative database for nearest.py using the CIE LUV color space, and database.js which is needed for nearest.html. Requires Pillow (PIL).
  • nearest.html and nearest.js allow you to use a front-end in your browser, by opening nearest.html directly. The implementation is somewhat lazy to avoid the use of an actual build system, and statically imports the dependencies Fuse.js, jQuery, and colorspaces. Requires database.js to be present, meaning ingest.py must be run first, unless you are using the included database.
  • explore.py traverses a subset of the 24-bit RGB color space and finds the pokemon that most closely match each color, and produces best.csv and counts.csv as results.
  • convert.py provides an RGB -> CIELUV implementation
  • database.csv, database-luv.csv, and database.js are included as well, built from the set of pngs detailed in pngs.md.