^MD Media Darkness

Print control, media and print mode ZPL caret command

Changes the print darkness relative to the printer's current darkness setting.

Format ^MDa

^MD parameters

Parameters of ^MD
ParameterMeaningAccepted valuesDefault
amedia darkness levelp. 301

The amount to add to (or, if negative, subtract from) the current darkness value.

On Zebra G-Series printers the value set by ^MD is kept across power cycles.

FirmwareOn the XiIIIPlus, Xi4 and RXi4 the darkness range is 0 to 30 in steps of 0.1, and the firmware lets ^MD and ~SD accept it.

-30 to 30

-30 to 30, depending on the current value.

The guide prints no Default line. It gives an initial value at power-up of 0 and says the command is ignored if no value is entered.

^MD notes and gotchas

  • Gotcha

    Each ^MD is applied to the current value as printed on the configuration label, not to the result of the previous ^MD. In the guide's example the current value is 15, ^MD-6 gives 9, and a following ^MD2 gives 17 (15 plus 2), not 11.

    p. 301
  • Interaction

    The result stops at the top of the scale: in the guide's examples a current value of 25 with ^MD10 becomes only 30, the maximum allowed. The other examples are 16 with ^MD-9 giving 7 and 1 with ^MD15 giving 16. The guide shows no example at the lower end of the scale.

    p. 301
  • Interaction

    A ~SD value, when one applies, is added to the ^MD value.

    p. 301
  • Firmware

    On Zebra G-Series printers the value set with ^MD stays in effect across power cycles.

    Firmware: Zebra G-Series printers. p. 301
  • Note

    The entry does not state where ^MD has to appear in a format.

    p. 301
  • Guide issue

    The note about the 0 to 30 range in steps of 0.1 prints the first printer name as the unresolved text &XiIIIPlus; (the printer is written XiIIIPlus in the example heading below it). The record uses XiIIIPlus.

    p. 301

^MD example

example.zplZPL
^XA
^MD-4
^FO30,25^A0N,36,36^FDDarkness shift^FS
^XZ

Lowers the darkness value by 4 from the printer's current value (for example from 16 to 12), then defines a one-line label. The change is relative; it is not a setting of 4.

Guides that use ^MD

BarcoderX is a .NET SDK for thermal labels and barcodes. See how it prints and exports labels.

Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 60, 190, 201, 204, 301, 333.

Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.