Some time ago I combined and edited/corrected this handy dandy sheet for trailer wiring color codes and positions in all common plugs, as viewed from both front and back of truck and or the trailer connection.
Print it out, laminate it, and keep it with your wiring supplies and tools.
Grigg
ps It does not have separate picture for flat 4, but they come molded with colored wires. The colors/functions are same as the automotive 6 and 7 wire plugs (not all same as semi truck 7 wire)