You can order a cable through some of our distributors, just be sure to get the “Pixy2 LEGO Cable” instead of the “Pixy LEGO Cable” which is slightly different.
Making your own LEGO cable requires a few parts. It's recommended that you use a 10-pin IDC connector, like this, which is already crimped with a ribbon cable, or this. You also need a LEGO Mindstorms sensor/motor cable that you don't mind chopping up, because those offset modular connectors are pretty hard to find. If you have a LEGO Mindstorms EV3 kit, you have several of these, but if you don't want to sacrifice one, you can buy them here or here, or possibly lots of other places too.
Below is the connection chart:
10-pin Pixy2 I/O Connector LEGO Cable Pin 2 ----------------------> green Pin 5 ----------------------> yellow Pin 6 ----------------------> red Pin 9 ----------------------> blue
The black and white wires from the LEGO cable are not connected to anything - you can just snip them off. Similarly, pins 1, 3, 4, 7, 8 and 10 on the 10-pin IDC are not used.
For more information, this page has Pixy2's port pinouts.