Most ODS styles will have objects GRAPHDATA1 though GRAPHDATAn, n might vary from style to style but 12 seems to be the default for most of the SAS supplied styles. These contain colors for fill, outline, lines, marker types and such. So the first "color" needed by your graph will get values from GRAPHDATA1, the second from GRAPHDATA2, and so on. When the colors get exhausted if more are needed then other rules may come into play such as cycling patterns and line types.
Some of the styles, such as JOURNAL and it's derivatives are intended for mostly black and white or gray scale output so rely more on patterns than color.
Proc template, as shown in the link @PeterClemmensen provided as an example, can get the definitions from a style though may rely on inheritance from a parent style.