Trailer wiring does have a universal color coding system to ensure uniformity across all trailer manufacturers. Any professionally wired trailer, regardless of number of wires, should be wired the same way.
The number of wires on a wiring harness varies depending on what type of trailer it is. Most common utility trailers have four connections. Green and yellow wires go to right and left turn signals, respectively. The brown wire is wired into the brake light, and the white wire is for the ground.
More heavy-duty trailers, such as those used to pull boats or cars, generally have seven connections. The green, yellow, brown and white wires have the same functionality as for the four-connection wiring harness. Additionally there are blue for trailer brakes, purple for backup lights and red for break-away lighting.