← Public packages
@kentcdodds/starsnake
Starsnake: steer a snake-like ship Asteroids style, grow a crystal tail, and spend crystals on towers to defend your core. Mobile friendly.
Files
# Palette-quantizes the generated PNG icons to keep the embedded bundle small.
import glob
from PIL import Image
for f in glob.glob('public/icons/*.png') + ['.kody/icon.png']:
im = Image.open(f)
if im.width < 64: continue
im = im.convert('RGBA').quantize(colors=160, method=Image.Quantize.FASTOCTREE, dither=Image.Dither.NONE)
im.save(f, optimize=True)
print(f, im.size)