There are red yellow gray and green wires, in that order.
Since these are quadrature controlled stepper motors, inverting direction only required swapping wire in each pair polarity.
Since each winding wires will be adjacent pairs, to change both polarities;
- Change 12,34 to 21,43 or Rd Yw, Gy Gn to Yw Rd,Gn Gy
The home command will rezero the counter steps. (now in the desired direction)
Reversing the connector 1234 to 4321 will also invert direction AND swap XY or rotate the position 90 deg which for a square gantry is OK.