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 an 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 characteristic, the color being selected randomly from the plurality of predetermined colors stored in the memory, wherein determining the characteristic comprises determining at least one of an area and a number of stitches for the color-based pattern portion as the characteristic; and assigning the color comprises assigning the color based on the at least one of an area and a number of stitches for the color-based pattern portion.