Go with BobA's color coding and you'll have it.
I'll add that some trackballs use purple in place of the brown, but the pinout on the connector is the same, at least with every Happ, Wico, and Betson/Imperial trackball I've dealt with so far. Also later Atari units, but not the older ones like the giant Missile Command / Atari Football type balls. GGG Electric Ice balls should match as well, I dunno about the Ultimarc unit as I've never had one.