Тайлбар байхгүй

Kirk Trombley bd4512b02d First pass at bringing back search 3 жил өмнө
.gitignore 7ca6f6cf28 Ignore big-pngs dir 3 жил өмнө
README.md ce05cae0e5 Update docs 3 жил өмнө
convert.js 53cbea3cd2 Add in space/hex conversion functions 3 жил өмнө
database-cam02.csv aae3fad879 Update databases 3 жил өмнө
database-v2.js d97ff6f2b4 Generate database v2 3 жил өмнө
database.csv 8231b34d4c Generate dbs from big pngs 3 жил өмнө
database.js c554364c28 Improve kmeans logic, write proportions to js db 3 жил өмнө
explore.py 3af774f436 Misc cleanup 3 жил өмнө
ingest.py d97ff6f2b4 Generate database v2 3 жил өмнө
listeners.js bd4512b02d First pass at bringing back search 3 жил өмнө
math.js 98fd4652ac Move contrasting color logic 3 жил өмнө
math.md ce05cae0e5 Update docs 3 жил өмнө
metrics.js 5d4e10bbea reorganize metrics 3 жил өмнө
nearest.css c36a981155 Implement pokemon tile rendering 3 жил өмнө
nearest.html bd4512b02d First pass at bringing back search 3 жил өмнө
nearest.js b8d6f7c839 add chebyshev distance 3 жил өмнө
nearest.py 9d01b436fc Update nearest script for CAM02, fix n=1 bug 3 жил өмнө
plan.md d97ff6f2b4 Generate database v2 3 жил өмнө
pngs.md 0d047c1960 Split up README, add more math docs 3 жил өмнө
render.js c36a981155 Implement pokemon tile rendering 3 жил өмнө
requirements.txt 73cfcfb8bf Add k-means computation for web version 3 жил өмнө
score.js 23d92981c9 Fix bugs with switching to spaces in score logic 3 жил өмнө

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

  • ingest.py generates database.csv which is needed for nearest.py, database-cam02.csv which is an alternative database for nearest.py using the CAM02-UCS color space, and database.js which is needed for nearest.html. Requires numpy, Pillow (PIL), and colorspacious.
  • nearest.py provides multiple options for finding pokemon "near" a color. No external dependencies, but a database must be provided. If CAM02-UCS is being used, this requires colorspacious and numpy.
  • 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, d3-color, and d3-cam02. 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.
  • database.csv, database-cam02.csv, and database.js are included as well, built from the set of pngs detailed in pngs.md.