From p_user.c, lines 3400 through 3406:
switch (player->skin)
{
case 1: /* Tails */ player->mo->color = SKINCOLOR_TSUPER1; break;
case 2: /* Knux */ player->mo->color = SKINCOLOR_KSUPER1; break;
default: /* everyone */ player->mo->color = SKINCOLOR_SUPER1; break;
}
player->mo->color += abs( ( (signed)( (unsigned)leveltime >> 1 ) % 9) - 4);
In other words... I don't really know for absolute certain
(at time of writing that, though looking more at it, I understand it more and more). What I do know is that first the base super colour is set, and then the colour is incremented based on the leveltime.
But I can tell you that from testing it in-game, it seems like it goes SUPER5, SUPER4, SUPER3, SUPER2, SUPER1, SUPER2, SUPER3, SUPER4, and SUPER5 before looping around again (yes, having SUPER5 play two times in a row/for twice as long), with 2 tics between each swap (meaning SUPER5 lasts for 4 tics and the rest of them last for 2 tics each time they're reached). Note that SUPER5 is the darkest super colour and SUPER1 is the brightest.
What you'll want to do is probably something based upon checking the value of
abs(((leveltime >> 1) % 7) - 3), with a value of 0 being for the brightest colour, 1 for the second-brightest, 2 for the second-darkest, and 3 for the darkest. Note that this is going to pulse a little faster than the vanilla 5-colour super colours, though, and also that I did not test it at all to make sure it even works that way in SRB2, but I think it should work.