make number of colours adjustable based on filesize, added additional palette tests