Guide

How to 3D print a QR code in two colors

A 3D printed QR code scans because the code and the background are different colors, not because of the relief. There are two ways to get there: with a multi-color system, or with a regular printer that pauses mid-print so you can swap filament.

First: choose the two colors well

The phone camera looks for contrast between the modules (the little squares) and the background. The most reliable choice is a dark code on a light background: black on white, navy on white or black on yellow. The reverse works on many phones too, but not all, so if the QR is for the public, don't risk it.

  • Avoid combinations with similar brightness: red on black, grey on silver or green on blue.
  • Be careful with glossy or “silk” filaments: they reflect light and, with a lamp overhead, the camera may lose part of the code. Matte finishes read better.
  • Translucent filaments let light through and lower the contrast: better not to use them for the background.

Option 1: a printer with a multi-color system (AMS, MMU, CFS)

This is the easiest way. The 3MF file you download from PrintMyQR already contains the base and the code as two separate parts, each with its color assigned. When you open it in your slicer, you just check that each part goes to the right filament.

  1. Open the 3MF and, if the slicer asks, accept loading it as a single object with multiple parts.
  2. In the object list, select the code part and assign it the dark filament; the base gets the light one.
  3. Slice and check the layer preview to make sure the color change starts exactly where the relief begins.

The multi-color system purges material at every color change, but a QR code only changes color in the relief layers, so waste is small.

Option 2: a single nozzle, swapping filament by hand

Because the code is raised above the base, every base layer is one color and every relief layer is the other. All the printer needs to do is pause at the first relief layer so you can change filament. It's free and works on any printer.

Bambu Studio and OrcaSlicer

  1. Slice the part and go to the preview.
  2. Drag the vertical layer slider to the first layer where the code appears.
  3. Right-click the slider and add a pause or a filament change at that layer.
  4. When the printer stops, unload the background filament, load the code filament and resume.

PrusaSlicer

  1. In the preview, set the vertical slider to the first relief layer.
  2. Click the “+” icon next to the slider to add a color change (the slicer inserts the filament change command at that height).
  3. When it reaches that layer, the printer will ask you to change filament.

Cura

  1. Go to Extensions → Post Processing → Modify G-Code.
  2. Add the “Pause at height” script (or the filament change script, if your printer supports it) and enter the layer or height in millimeters where the relief begins.
  3. Slice again and check in the preview that the pause is in the right place.

How to find the layer where the relief begins

The relief height is the total height of the part minus the thickness of the base. If the base is 3 mm and you slice with 0.2 mm layers, the code starts at layer 16 (the first one above 3 mm). The safest way is to check the preview: it's the first layer where you see the squares appear.

Settings that improve the result

  • 0.16-0.2 mm layer height for clean module edges.
  • 0.4 mm nozzle: with it, each module should be at least 1.5 mm wide. The tool warns you if the code gets more cramped.
  • A well-calibrated first layer: if the base comes out with blobs or gaps, it shows in the contrast of the code.
  • Two or three relief layers are enough: more height doesn't improve scanning and only makes the print longer.

Before printing the final piece

Do a quick test: scan the code on your computer screen from the tool's preview. If it works there and you respect the minimum module size and the contrast, it will work printed.

Create my QR code for 3D printing