How to make a .cpt file with repeated colours?

I am planning to make a .cpt file which repeats colours in a specific pattern.
(example: blue (mod 4 = 1), green (mod 4 = 2), yellow (mod 4 = 3), red (mod 4 = 0))

Existing:
Default Plate ID (mod 11)

I do not know how to make a .cpt file like this.

– faster328

*.cpt files follow the GMT color palette file syntax and can be generated using the gmt makecpt command. The files themselves are plain text and can hence be manipulated/tuned by hand. You can find some some examples in the GPlates SampleDataCptFiles directory to get started. The files in there have some description in the header as to what the coloring will result in. If you can describe your pattern in some algorithm you might as well write a cpt file using a shell or Python script.

Cheers,
Christian