What are you connecting it to?
If you're connecting to an opti-wiz no-solder, it should be plug and play.

Red/black is 5v/ground. (right side of board)
Green/yellow is one axis. (Y-axis IIRC probably connects to pins C+D of opti-wiz, assuming the wires come off the lower right corner of the TB)
Blue/purple is the other axis. (X-axis IIRC probably connects to pins A+B of opti-wiz)
You won't damage anything if green, yellow, blue, or purple are accidently swapped around.
If you move the trackball horizontally and the cursor moves vertically, swap green/yellow for blue/purple.
If an axis moves the opposite direction you expect it to, swap green + yellow or blue + purple.
Scott