Keine Beschreibung

Kirk Trombley 780ab884a6 Fix up metric select styling, fade cluster when not in use vor 2 Jahren
web 0c2fb94c90 format vor 2 Jahren
.gitignore 7ca6f6cf28 Ignore big-pngs dir vor 3 Jahren
.prettierrc 0be1c423d7 prettier conf for vscode vor 2 Jahren
README.md ce05cae0e5 Update docs vor 3 Jahren
anim_ingest.py 30038b21c6 Undo AFD settings, keep the stuff that made sense vor 3 Jahren
database-anim.js 67d6028464 Add k=2 support vor 3 Jahren
database-cam02.csv aae3fad879 Update databases vor 3 Jahren
database-v2.js d97ff6f2b4 Generate database v2 vor 3 Jahren
database-v3-afd.js 2a903c1667 AFD mode vor 3 Jahren
database-v3.js 231652c349 Add lightness cut off to merges vor 3 Jahren
database.csv 8231b34d4c Generate dbs from big pngs vor 3 Jahren
database.js c554364c28 Improve kmeans logic, write proportions to js db vor 3 Jahren
explore.py 3af774f436 Misc cleanup vor 3 Jahren
form.js 780ab884a6 Fix up metric select styling, fade cluster when not in use vor 2 Jahren
index.html 5f27832e0f Primary layout vor 2 Jahren
ingest.py d97ff6f2b4 Generate database v2 vor 3 Jahren
math.js e4355bd6ea Move calc logic to math module vor 2 Jahren
math.md ce05cae0e5 Update docs vor 3 Jahren
nearest.html 133c339f7f revert AFD thing so I stop losing my mind vor 2 Jahren
nearest.py 9d01b436fc Update nearest script for CAM02, fix n=1 bug vor 3 Jahren
plan.md d97ff6f2b4 Generate database v2 vor 3 Jahren
pngs.md 0d047c1960 Split up README, add more math docs vor 3 Jahren
requirements.txt 47f5ef4a69 Add reqs for anim_ingest vor 3 Jahren
styles.css 780ab884a6 Fix up metric select styling, fade cluster when not in use vor 2 Jahren

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.