HP PCL/PJL reference (PCL 5 Color) - Technical Reference Manual

C-2 Using Palettes (Color LaserJet, 5, 5M, DeskJet) EN
In non-raster mode, the current palette contains all the colors
available to the printer. In raster mode, indexed color selection uses
the palette, but direct selection does not.
Default palettes are created by all the PCL color modes (Black and
White, Simple Color, PCL Imaging, and HP-GL/2 Imaging). The active
palette may be modified when in the PCL Imaging or HP-GL/2
imaging modes, but not when in the Simple Color or Black and White
modes. When switching between PCL 5 and HP-GL/2 contexts, the
active palette is automatically transferred.
Multiple palettes can exist in the system via the Palette ID and Palette
Stack mechanism. However, only one palette at a time can be active.
A palette created in the PCL context remains active and unchanged
when switching to the HP-GL/2 context, and a palette created in the
HP-GL/2 context remains active and unchanged when switching to
the PCL context. Performing a reset or entering PJL overwrites the
active palette with the default black and white palette.
Whenever a new palette is created, the currently or previously active
palette is destroyed. A new palette is created by power-on and also by
the following commands:
PCL Reset (
?E)
•Simple Color (
?*r#U)
Configure Image Data (
?*v#W)
HP-GL/2 Initialize (IN)
The active palette can be saved by pushing it onto the palette stack
with the Push/Pop Palette command (
?*p#P). Popping a palette from
the stack destroys the active palette—the popped palette becomes
the active palette.