png: replace giant switch for color lookup with a map