generate a brickpattern from an image based on a set of predefined brick colors