Basically, the idea is to keep pin number 1 of the patch panel port number 1 connected to pin number 1 of the jack number 1. Pin #2 of the patch panel port #1 connected to pin #2 of the jack #1 and so on and so forth. So, there should not be a pin number change inside. If you need to make a crossover, it should be an outside (detachable) cord.
The actual color code depends on the manufacturer of the panel/jacks. In most cases they either include a colored paper insert or stick a colored label onto the jack to designate the pairs by color. As always, blue pair is #1, orange is #2, green is #3 and brown is #4.
Dmitri Abaimov, RCDD