1. A data generator comprising: a memory configured to store a plurality of predetermined colors; and a processor configured to control the data generator to: determine a characteristic of a color-based pattern portion, a plurality of the color-based pattern portions being included in a embroidery pattern; and assign a color, which being used as thread color data, for each of the plurality of color-based pattern portions based on the characteristics, the color being selected randomly from the plurality of predetermined colors stored in the memory.