You specify the color priority where the first color on the list is in front and the last color is in back.
Reordering method
Draworder Location
CDRAWORDER orders objects according to their displayed color. Selected objects can have their color assigned by BYLAYER or explicitly by object.
Usage Example:
Original order with red on the bottom and blue on the top:
After using CDORDER to move blue to the bottom and red to the top: