|
il y a 3 ans | |
---|---|---|
.gitignore | il y a 3 ans | |
README.md | il y a 3 ans | |
convert.py | il y a 3 ans | |
database-luv.csv | il y a 3 ans | |
database.csv | il y a 3 ans | |
database.js | il y a 3 ans | |
explore.py | il y a 3 ans | |
ingest.py | il y a 3 ans | |
math.md | il y a 3 ans | |
nearest.html | il y a 3 ans | |
nearest.js | il y a 3 ans | |
nearest.py | il y a 3 ans | |
pngs.md | il y a 3 ans | |
requirements.txt | il y a 3 ans |
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.
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 implementationdatabase.csv
, database-luv.csv
, and database.js
are included as well,
built from the set of pngs detailed in pngs.md.