function preload() {
  loadImage('data/pic1.jpg', setImage);
}
extract and sort the color palette of an image

MOUSE
position x          : resolution

KEYS
1-4                 : load different images
5                   : no color sorting
6                   : sort colors on hue
7                   : sort colors on saturation
8                   : sort colors on brightness
9                   : sort colors on greyscale (luminance)
s                   : save png
c                   : save color palette