QR3D Craft

Printing a two-colour QR on an ordinary printer

By · 7 min read · Updated 26 October 2026

Leer en español

You do not need a multi-material printer to print a two-colour QR code. You need a pause on the right layer and thirty seconds of your time while the machine waits. Here is how it is done in each slicer.

Why this works

The piece is built for it from the start: the base is a solid block and the relief of the QR starts exactly on the layer after the last one of the base. Not a single module begins halfway up and no parts overlap.

That means there is one single horizontal plane where everything below is the base colour and everything above is the code colour. Change the filament at that plane and you have a two-colour piece. It is not a trick: it is why the geometry is built that way.

Section through the piece: light base, dark relief, and the layer where the filament changesThe base is 3.0 mm and the relief 1.0 mm. With 0.20 mm layers, the colour change goes on layer 15.base 3.0 mmrelief 1.0 mmColour change on layer 15 — height 3.0 mmat a layer height of 0.20 mm
The relief starts exactly where the base ends. That is why one filament change is enough, and why it always lands on a whole layer number.

Step 1: work out which layer to change on

You only need two numbers, and you know both:

change layer = (base height ÷ layer height) + 1

With the most common values:

BaseLayer heightBase layersChange on layer
2.0 mm0.20 mm1011
2.0 mm0.16 mm12.5 → see warning—
2.4 mm0.20 mm1213
3.0 mm0.20 mm1516
3.0 mm0.15 mm2021
1.6 mm0.20 mm89

The sum has to come out whole. If the base is 2 mm and the layer 0.16 mm, that is 12.5 layers: the colour change would land halfway through a layer and leave a mixed band. The relief has the same problem and it is covered in the layer height guide (in Spanish). Pick a layer height that divides the base height exactly. With a 2 mm base, 0.2 · 0.25 · 0.1 all work; with a 3 mm base, 0.2 · 0.15 · 0.3 · 0.1. If you are still in time to choose the thickness, choose it with this in mind too: the base thickness guide says which suits each piece, and every one it recommends divides cleanly.

Remember as well that the first layer is usually thicker than the rest. If your profile puts it at 0.3 mm and the others at 0.2, the sum changes. There is no need to do it by hand: the slicer tells you the height in millimetres of each layer as you drag the bar, and that is the number to look at.

And there is something that decides this sum before you start: which orientation you are going to print in. As the file comes, the base goes first and the change falls when 75 % of the piece is already printed. If you turn the plate over so the code sits against the bed, the change moves forward to layer 6 of 20, and other less pleasant things move forward with it: the two options are compared in the face up or face down guide (in Spanish).

Step 2: put the change into your slicer

Bambu Studio and OrcaSlicer

  1. Slice the piece and go to the preview.
  2. Drag the slider on the right-hand vertical bar to the height where the base ends. Watch the number in millimetres that appears: it has to match your base height.
  3. Press the orange «+» that appears over the bar.
  4. Choose «Change filament».
  5. Slice again. You will see the colour of the model change from that height up.

If you have an AMS you need none of this: assign a filament to each object in the right-hand panel and that is it.

PrusaSlicer

  1. Slice and go to the preview.
  2. On the vertical bar on the right, move to the change layer.
  3. Press the orange «+» icon to the left of the bar.
  4. A Color change is added. That is the point at which the printer will stop.

Cura

Cura calls it something else and it is a little more hidden:

  1. Menu Extensions → Post Processing → Modify G-Code.
  2. Add a script and choose «Filament Change».
  3. In Layer, type the number of the change layer.
  4. Accept and slice again.

Careful with Cura's numbering. Cura's script counts layers starting at 1 but the preview sometimes shows the first as 0. If the change comes out one layer before or after what you wanted, adjust by one and look again. It is worth checking on a 2 cm test piece before committing to a run.

Step 3: the change at the printer

When it reaches that layer, the printer stops, moves the head aside and waits. Then:

  1. Unload the base filament. On most machines there is an unload button in the pause menu itself; if not, heat the nozzle and pull gently.
  2. Load the second filament and run it through until it comes out clean.
  3. Purge properly. This is the step most people skip and the one that ruins the result most: if any of the first colour is left in the melt chamber, the first modules come out a mixed tone and the contrast is wrecked on exactly the layer that matters most. Push material through until the colour is even, even if it feels wasteful.
  4. Wipe the nozzle before resuming, with tweezers or a cotton cloth. A strand left hanging gets dragged over the code and leaves a streak.
  5. Resume.

Mistakes to avoid

Is it worth it against buying an AMS?

For single pieces and short runs, without any doubt: the manual change takes a minute and costs nothing. The sum changes when you print many pieces in a row, because each one forces you to be standing there, and that is where a multi-material system pays for itself in time.

There is a middle option a lot of people do not take: print several pieces at once on the same plate. Since they all have the base at the same height, they all change colour on the same layer, so one manual change covers twelve keychains. You only have to make sure the slicer is in «by layer» mode and not «object by object».

And there is a third option, which is not changing colour at all: an engraved code (in Spanish) prints in one go, with a single filament and no pauses. You pay for it in another currency, because that code depends on light reaching it from the side, but for pieces that live somewhere fixed and well lit it is the most convenient option.

The piece comes ready for it

The generator always builds the base and the relief as two separate volumes touching on a single plane, precisely so this method works. When you open the file in the slicer all you have to do is read off the layer bar the height where the base ends, and put the change there.

Generate the piece

Keep reading