I did this as an experiment, limiting myself to a palette of predefined colors, where texturing was achieved by mapping UVs to specific areas of the color palette.