The color scheme for the pre-war years looks clownish but was actually pretty logical, and good for identifying who was who in the zoo in an era when plane-to-plane comms could be iffy or nonexistent.
Squadrons were divided up into six three-aircraft sections. Each section had an assigned color, 1st section=red, 2nd=white, 3rd, blue, 4th=black, 5th=green, 6th=yellow. All aircraft in the section had a wing-top chevron in that color. Section lead also had the color on a fuselage band and the full cowling, left wing had the top half of the cowling, right wing the bottom half. Tail color indicated which carrier/CAG or Patrol Wing the aircraft belonged to.
The fuselage "side number" was squadron-type-a/c #.
So the lead (middle) F2F in the lower picture is a/c #4 from VF-2 off of Lexington. If you're joining up on someone, no radio, and nav by DR only, helps to immediately know who the other guy is.