Here's a pile of info from TPS categories in 1997 GM service manuals (97 was a spotty info year, so you may have to do a bit of evaluating). You should be able to identify things from this, or share more details as you dig further, if needed. Your colors may also be faded versions of the ones I mention below, if you peel back loom further, but maybe not.
Schematic for 1997 TPS/PCM wires for some engine items (if necessary, you can use a multimeter on wires with key-on to confirm 5V and ground, or chase continuity back to PCM pins with power disconnected)
Pin A: Black ground (to PCM Blue C1 connector, Pin 56)
Pin B: Dark Blue position signal out (to PCM Clear C2 connector, Pin 53)
Pin C: Grey 5V from PCM (to PCM Blue C1 connector, Pin 16)
PCM connector face numbering map (same for both)
With battery disconnected, you can use a 7mm (or 9/32") socket to loosen the center bolt to pull straight out from the PCM (there's a rubber weather seal gasket that will be in there). The bolt stays in the connector, similar to the ignition module's 7mm bolt in the center of the flat harness, so just recognize when it gets fully loose, and carefully line up for install to snug down just barely hand-tight.
TPS system description, in case you need notes.