Tool to convert images into bricks of a predefined colour palette