There are two methods for doing color swaps in PrusaSlicer. Both techniques use the same g code but are applied in different methods. The standard method allows you to change colors at every layer, and the multiple extruder hack method, where you can change colors within a layer.
Go to Printer Settings -> Custom G-code -> Color Change G-code (there is a simple M600 code by default). Change it to this:
;COLOR CHANGE
G91
G1 Z30 F600
G90
M600
G91
G1 E-3 F1200
G1 Z-30 F600
G90
Now, in Prusa, slice your model and place the layer marker on the first layer of the new color.
Add the second color just the way you do it in Prusa.
Add as many colors as you want.
Slice again - this is when PrusaSlicer will generate custom gcode for color changes.
Export your gcode. It is ready to be printed!
This is how it worked with this example.
When AM5 will hit color change layer, the print head will go to left and to the front. It will move every 5s by 1,1 (total time 45s). This is your moment to hit PAUSE button on printer screen and change the filament (it is possible after pausing the print). When you resume printing, the movement to 0,0 (left front corner of the plate) will continue. Then it resumes printing. Filament changing is done 30mm above last printed layer.
AM5 supports M600 color change gcode since firmware 2.0.84_2.0.66. At a specified layer, the printer will stop, move up and front left, and send push notifications to your AnkerMake app.
That’s It’ll be it! Happy multicolor printing!
This video explains the multiple extruder hack method that can be used. This allows you to change colors within the same layer.