Skip to content

Black Friday

Annual Pro is $90 for the first year, normally $120. Or start monthly at $6 for two months, then $12.

Ends Dec 4, 11:59 PM PT.

Create an account
← 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.

FollowForkOpen app

Files

shrink-icons.py

9 lines · 391 B · Python
# 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)