Forget the g-code. When you want to change colors, wait til the printer is on the inside of the object. Have your new color ready. Release the feeder lock while printing, pull the old filament out, and insert the new color. Relock the feeder and you're in business. The printer won't miss but a small insignificant area. Try it!