HP (Hewlett-Packard) PCL User Manual

PCL 5 Color Technical Reference Manual

Notice
Copyright and License
Copyright © 1999 Hewlett-Packard Company.
All rights are reserved. This document contains proprietary information which is protected by copyright. Except as allowed by copyright laws or herein, reproduction, adaptation, or translation without prior written permission is prohibited.
Trademarks
Adobe, PostScript, and the PostScript logo are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions. AppleTalk is a registered trademark of Apple Computer, Inc. PCL and Resolution Enhancement are registered trademarks of Hewlett-Packard Compan y. IBM is a registered trademark of International Business Machines Corporation.
Hewlett-Packard Company 11311 Chinden Boulevard Boise, Idaho 83714 U.S.A.

Inside This Manual

What You Can Learn From This Manual
This manual describes the PCL 5 commands used to print color on the HP Color LaserJet printer family and the other Hewlett-Packard PCL 5 color printers. Some of the main topics include an overview of the color printing process, using palettes, choosing color modes, adjusting output color to meet your requirements, printing color raster graphics, and HP-GL/2 vector graphics. Examples are provided which demonstrate the use of the PCL 5 color commands.
Note All commands described in this manual are not necessarily supported
by all printers. See the PCL 5 Comparison Guide for feature support information for each printer.
This manual is written primarily for users that are already familiar with PCL 5 printer features. For information on using PCL 5, see the PCL 5 Printer Language Technical Reference Manual.
iii

Manual Organization

This manual contains seven chapters and four appendices. Chapters 2 through 4 describe command usage for the HP Color LaserJet 4500 and 8500 printers. Appendices A through D describe how these functions are achieved on the HP Color LaserJet, Color LaserJet 5, 5M, and the DeskJet 1200C and 1600C printers. Chapters 5 through 7 pertain to all the color printers described in this manual. A brief description of each chapter is provided below.
Chapter 1. Color Printing Overview
This chapter explains background information about printing color documents using PCL 5. Topics include palettes, color selection, pixel encoding, color modes, and color matching.
Chapter 2. Using Color Modes
Chapter 2 defines the color modes and describes how to use them, including descriptions of sending color raster data using different pixel encoding modes and color spaces.
Chapter 3. Using Palettes
This chapter describes the palettes associated with the color modes and explains how palettes are created, saved, and modified.
Chapter 4. Modifying Output Color
This chapter explains the options for modifying the output color: the Render Algorithm command, the Monochrome Print Mode command, Driver Configuration command, and Finish Mode command.
Chapter 5. The PCL Print Model
Chapter 5 describes the print model and how it determines the printed outcome when various patterns, colors, and images are applied together on a page. This chapter discusses the role that logical operations and transparency modes have on this process.
Chapter 6. Raster Graphics
This chapter describes the raster graphics commands and also compressing raster graphics images using various compression methods.
iv
Chapter 7. Color Vector Graphics (HP-GL/2)
This chapter discusses printing color pages using HP-GL/2, the vector graphics language included on all PCL 5 printers. The chapter describes new and/or modified HP-GL/2 commands and how they are used to print with HP color print ers.
Appendix A. Color Printing Overview (Color LaserJet, 5, 5M, DeskJet)
Appendix A explains background information about printing color documents using PCL 5. Topics include palettes, device-dependent vs. device-independent color, color selection, pixel encoding, color modes, and color matching.
Appendix B. Using Color Modes (Color LaserJet, 5, 5M, DeskJet)
Appendix B defines the color modes for the HP Color LaserJet, Color LaserJet 5, 5M, and the DeskJet 1200C and 1600C printers, and describes how to use them. It includes descriptions of sending color raster data using different pixel encoding modes and color spaces.
Appendix C. Using Palettes (Color LaserJet, 5, 5M, DeskJet)
Appendix C describes the use of palettes for the HP Color LaserJet, 5, and 5M, and DeskJet 1200C and 1600C printers. It explains the palettes associated with the color modes and explains how palettes are created, saved, and modified.
Appendix D. Modifying Output Color (Color LaserJet, 5, 5M, DeskJet)
Appendix D describes how to modify output color for the HP Color LaserJet, Color LaserJet 5, 5M, and the DeskJet 1200C and 1600C printers. This chapter explains how color can be optimized by compensating for different conditions, such as variations in color due to light sources, limitations of the original artwork and variations in viewing monitors. The chapter details the use of halftone rendering algorithms, color lookup tables, gamma correction, and viewing illuminant commands. These commands are provided so that users can request and receive color output that matches their expectations.
Index
An index offers quick access to PCL command information.
v

Related Documents

The following documents provide related information about Hewlett-Packard PCL 5 printers.
PCL 5 Printer Language Technical Reference Manual
The PCL 5 Printer Language Technical Reference Manual provides a description of the printer command language that controls PCL 5 printers. The manual provides explanations of each PCL command, and has examples demonstrating how the commands are used to manipulate the printer. A large portion of the manual is devoted to HP-GL/2, the vector-based graphics language in PCL 5 printers.
PCL 5 Comparison Guide
This document provides printer-specific information on paper handling, internal fonts, PCL command support, and control panel information. It identifies feature differences between the various PCL 5 printers, and how the printers implement the commands described in the PCL 5 Printer Language Technical Reference Manual.
Printer Job Language Technical Reference Manual
This manual describes PJL, the HP printer job language used on many of the Hewlett-Packard printers. PJL is used for switching printer languages, requesting status information, changing display messages, inquiring about feature settings, and other job-level functions.
PCL/PJL Technical Quick Reference Guide
This booklet is designed to provide quick access to the syntax of each PCL and PJL command. The commands are grouped by their function so that those familiar with PCL and/or PJL can find the syntax of a specific command without opening the manual.
vi

Contents

PCL 5 Color T e c hnic al Re ference Manual
Inside This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Manual Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Related Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
. . . . . . . . .
Chapter 1 Color Printing Overview
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-1
Working with color documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2
PCL 5 Color Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3
Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3
Color Specifications and Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3
Color Management and the Standard Red, Green, Blue Color Space. . . . . . . .1-4
Palettes and Color Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6
PCL 5 Color Graphics Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6
PCL 5 Color Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6
PCL 5 Raster Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-7
Pixels and Pixel Encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-7
Well-Behaved Raster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-9
Chapter 2 Using Color Modes
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1
Simple Color Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3
PCL Imaging Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-5
Configure Image Data (CID) Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-5
HP-GL/2 Imaging Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13
Chapter 3 Using Palettes
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1
Saving the Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3
Push/Pop Palette Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3
Palette Management by ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5
Select Palette Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6
Palette Control ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8
Palette Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
Simple Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11
EN Contents vii
CID Color Palettes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
Device RGB and sRGB Palettes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
Device CMY Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14
HP-GL/2 Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15
Foreground Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17
Foreground Color Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17
Programming Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19
Chapter 4 Modifying Output Color
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1
Halftone Render Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
Render Algorithm Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
Monochrome Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3
Monochrome Print Mode Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3
Driver Configuration Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
Finish Mode Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Chapter 5 The PCL Print Model
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1
Command Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6
Source Transparency Mode Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7
Pattern Transparency Mode Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-8
Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9
Logical Operations and Transparency Interactions. . . . . . . . . . . . . . . . . . . . . .5-12
Logical Operation Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-13
ROPs in the RGB Color Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-14
ROPs in the CMY Color Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-15
Using a ROP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-16
Table of Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-18
Pixel Placement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Pixel Placement Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27
Filling with Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-28
Pattern ID (Area Fill ID) Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-29
Select Current Pattern Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-32
User-Defined Pattern Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-33
Using User-Defined Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-33
How the Printer Tiles a Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-34
Pattern Reference Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-36
Download Pattern Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-38
User-defined Pattern Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-40
Set Pattern Reference Point Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-43
Pattern Control Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-44
Rectangular Area Fills (Rules) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-45
Pattern Transparency for Rectangular Area Fill. . . . . . . . . . . . . . . . . . . . . . . . . . . .5-50
Contents viii EN
Rectangular Fill Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-52
Solid Fill (Black/White) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-52
Shaded Fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-54
Chapter 6 Raster Graphics
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-1
PCL 5 Color Raster Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-4
Raster Graphics Command Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-6
Raster Graphics Resolution Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-8
Raster Graphics Presentation Mode Command . . . . . . . . . . . . . . . . . . . . . . . . . . .6-10
Source Raster Height Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-13
Source Raster Width Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-15
Start Raster Graphics Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-17
Raster Y Offset Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-19
Set Compression Method Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-20
Unencoded (Method 0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-21
Run-length Encoding (Method 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-21
Tagged Image File Format Encoding (Method 2) . . . . . . . . . . . . . . . . . . . . . . .6-21
Delta Row Compression (Method 3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-24
Adaptive Compression (Method 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-28
Transfer Raster Data Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-32
Transfer Raster Data by Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-33
Transfer Raster Data By Row/Block Command . . . . . . . . . . . . . . . . . . . . . . . .6-33
End Raster Graphics Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-35
Raster Scaling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-36
Raster Graphics Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-38
Color Raster Graphics Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-42
Chapter 7 Color Vector Graphics (HP-GL/2)
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-1
Enter HP-GL/2 Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
MC (Merge Control). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-6
PC (Pen Color) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-14
NP (Number of Pens) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-17
CR (Color Range) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-19
PP (Pixel Placement) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-20
EN Contents ix
Appendix A Color Printing Overview (Color LaserJet, 5, 5M, DeskJet)
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Color Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Palettes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Raster Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Raster Color vs. Non-Raster Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Device-Dependent vs. Device-Independent Color . . . . . . . . . . . . . . . . . . . . . . A-4
Black and White References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Color Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
Pixel Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Encoding by Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Color Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Device-Dependent Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
Device-Independent Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
Device-Independent Color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-10
Device-Dependent Color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-10
Device-Independent Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-10
Color Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-11
Processing Color Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-14
Non-Raster Color vs. Raster Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-14
Color Raster Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-14
Appendix B Using Color Modes (Color LaserJet, 5, 5M, DeskJet)
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Simple Color Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4
PCL Imaging Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6
Configure Image Data (CID) Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6
Short Form of CID Command (Configure Image Data) . . . . . . . . . . . . . . . . . B-15
Long Form of CID Command (Configure Image Data) . . . . . . . . . . . . . . . . . . B-17
HP-GL/2 Imaging Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-28
Appendix C Using Palettes (Color LaserJet, 5, 5M, DeskJet)
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
Saving the Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-3
Push/Pop Palette Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-3
Palette Management by ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-5
Palette Control ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-8
Palette Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-9
Simple Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-11
CID Color Palettes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-13
HP-GL/2 Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-16
Foreground Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-18
Contents x EN
Programming Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-20
Color Component One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-20
Color Component Two . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-20
Color Component Three . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-21
Assign Color Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-21
Appendix D Modifying Output Color (Color LaserJet, 5, 5M, DeskJet)
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1
Halftone Render Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-3
Render Algorithm Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-3
User-Defined Dithers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-6
Download Dither Matrix Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-7
Multiple Dither Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-10
Color Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-13
Gamma Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-17
Viewing Illuminant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-18
Monochrome Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-20
Driver Configuration Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-21
Index
EN Contents xi
Contents xii EN
Color Printing
1
Ov erview

Introduction

This chapter provides an overview of color printing with Hewlett-Packard printers. A primary goal for HP color printers has always been WYSIWYG (What You See Is What You Get) color, where the color displayed on the screen while creating a document is the same as the color in the printed document. However, this goal has been very difficult to realize due to a number of factors such as:
• Some colors that can be shown on a computer display cannot be reproduced by a printer.
• The Cyan, Magenta, and Yellow colors used to create the colors specified in a document can differ in hue and quality from printer to printer, even printers from the same manufacturer. Furthermore, the colors produced by a given printer can change over time, due to internal changes as well as temperature and humidity.
Until recently, these and other problems have led HP to approach color matching by presenting a PCL 5 color command set giving users the ability to make both major and minor color print quality adjustments.
However, the emergence of sRGB (standard Red Green Blue) as an international color data standard and the growing sophistication of Hewlett-Packard printers has allowed HP to provide high quality WYSIWYG color documents with a much simpler PCL color command set. Therefore, this manual has two main parts: Chapters 1 through 7 present the latest, simplified PCL 5 color command set, and the appendices describe the command set described in Chapters 1 through 4 as they are supported by the Color LaserJet, Color LaserJet 5, DeskJet 1200C, and DeskJet 1600C printers. Chapters 5 – 7 pertain to both sets of printers.
EN Color Printing Overview 1-1

Working with color documents

A document can be thought of as a series of text characters, vector graphics objects and images. The parts of a document either have color specifications in them, as do color images, or have color specifications applied to them, as do color vectors or text. For color images, the PCL 5 command set provides a way to specify the color format so that the image data can be interpreted correctly. For vector graphics and text, the PCL 5 color commands support the application of a color from a palette of colors.
Each color printed is synthesized from a combination of three colors: Cyan, Magenta, and Y ellow . The wa y the three colors are combined to produce the desired color is called a half-tone, and the PCL 5 color command, Render Algorithm, specifies which half-tone to use for a color. Advances in Hewlett-Packard printers have allowed HP to reduce the number of render algorithms to Best, High, and Low. While the actual implementation of each of these algorithms may vary from printer to printer, HP has determined that the three algorithms are sufficient to produce high quality color documents containing text and graphics.
The colors that appear on a page also have one of two color treatments applied to them:
1 Screen Match (sRGB), which provides the best WYSIWYG color.
This is the default color treatment.
2 The Vivid color treatment, which provides access to the entire
device gamut (range of colors the printer can produce). However , these colors are less correlated to those shown on a monitor than colors that have had the Screen Match treatment applied.
The following factors form the heart of the PCL color graphics state:
• The palette of colors to be used in a document
• The render algorithm to print the colors
• The color treatment to be applied to each color
Palettes of colors can be referenced by an ID, and so can PCL color graphic states. At any given time there is an active palette to apply colors from, along with a render algorithm and color treatment to be applied to the colors. Palettes and their associated render algorithm and color treatment can be stored and retrieved using a palette ID. When a palette is retrieved and made the active palette, the render algorithm and color treatment stored with the palette are set as the current render algorithm and color treatment.
1-2 Color Printing Overview EN
The PCL language also allows users to use patterns in combination with colors. These patterns and colors can be combined with text, vector graphics, and images to create new, complex graphics objects. The PCL Print Model determines the logical operations (known as ROPs, Raster Operations) used to combine each part of the graphic object.

PCL 5 Color Concepts

This section describes some of the concepts and terminology of color science related to the PCL 5 color commands.

Color

Color is a combination of human physiological and psychological responses to a relatively narrow band of frequencies in the electromagnetic spectrum. The frequencies visible to the human eye are called the visible spectrum. It’s useful to understand that color comes both from direct light and indirect light that has reflected from a surface. Reflected light absorbs all but the reflected frequency. The colors seen on a color monitor are combinations of different-colored lights traveling directly to the eye. They are called additive colors since the different colors combine to form the resulting color. The colors seen on a printed material such as paper are reflected from the paper surface, which absorbs some of the light. Colors seen under these conditions depend on the viewing conditions, the amount and color of ambient light, as well as the amount and color of the reflected light.

Color Specifications and Color Spaces

A given color can be described as particular amounts of three light frequencies (red, green, and blue light). For example, equal amounts of red, green, and blue light are perceived as white light. The absence of all three primary light colors is black.
EN Color Printing Overview 1-3
Color can be described in ways other than amounts of red, green, and blue light. Generally, these color specification systems are known as color spaces. For example, The Cyan, Magenta, Yellow (CMY) color space is us ed to descri be color s that ar e printed b y dep ositin g varyin g amounts of these three ink pigments (Cyan, Magenta, Yellow). The absence of pigment is considered to be white, and the presence of all three is black. The CMYK color space is similar to the CMY color space, but black pigment is used in place of 100% C, M, Y since imperfections in the hues of the C, M, Y pigments yield a dark brown rather than black.
A color specification, then, depends on the color space as well as the values used to describe a given color. Black in the RGB color space is described using the three numbers (0, 0, 0), but in the CMY color space it is described as (100, 100, 100), where the values are percentages of each color.

Color Management and the Standard Red, Green, Blue Color Space

For color to be reproduced in a predictable manner across different devices and materials, it has to be described in a way that is independent of the specific mechanisms and materials used to produce it. For instance, color displays and color printers use very different mechanisms for producing color. Traditionally, operating systems have supported color by declaring support for a particular color space (RGB in most cases). However , since the interpretation of RGB values varies between devices, color was not reliably reproduc ed across different devices.
The needs of the very high-end publishing sector could not be met by the traditional means of color support, so the various computer operating systems added support for using International Color Consortium (ICC) profiles to characterize device-dependent colors in a device-independent way. They used the profiles of the input device that created an image, and the output device that displayed or printed the image, to create a transform that moved the image from the color space of the input device to that of the output device. This resulted in very accurate color and access to the entire color gamut of both devices. However, it also involved the overhead of transporting the profile of the input device with the image and running the image through the transform.
1-4 Color Printing Overview EN
Note HP’s ICC profiles are available through normal HP software
distribution channels. For those who want the additional control available through building their own ICC profiles, there are several vendors of profiling tools available. To provide access to the printer's pure primaries and entire available printer gamut, the Vivid mode may be used when profiling the printer, and subsequently when using the ICC workflow.
However, there are a broad range of users that do not require this level of flexibility and control in an embedded color profile mechanism. Instead it is possible to define a single, standard default color space for exchange and interpretation of color data. Additionally , most existing file formats do not support color profile embedding, and may never do so. There is also a broad range of uses that actually discourages people from appending any extra data to their files. The sRGB color space addresses these issues.
The sRGB color space maintains the advantage of a clear relationship with ICC color management systems while minimizing software processes and support requirements. Since the image is in a known color space and the profile for that color space is included within the operating system and display application, this enables end-users to enjoy the benefits of color management without the overhead of larger files. Application developers and users who do not want the overhead of embedding profiles in documents or images should convert them to sRGB. While it may be that profiles buy slightly higher color accuracy, the benefits of using a standard color space far outweigh the drawbacks for a wide range of users. The migration of devices to support the standard color space (sRGB) natively will further enhance the speed and quality of the user experience.
The international standard color space sRGB (IEC 61966-2-1) is designed to complement current color management strategies by enabling a simple, robust method of handling color in the operating systems, device drivers and the Internet. This solution provides good quality and backward compatibility with minimum transmission and system overhead. Based on a calibrated colorimetric RGB color space well suited to cathode ray tube (CRT) displays, flat panel displays, television, scanners, digital cameras, and printing systems, the sRGB color space can be supported with minimum cost to software and hardware vendors. The four major technical components of the sRGB color space are the standard CRT primaries (HDTV P22 phosphors); the simple gamma value of 2.2, a D65 white point, and its well-defined viewing conditions.
EN Color Printing Overview 1-5

Palettes and Color Selection

The PCL 5 language allows the user to define a palette of colors. Each color is specified by three quantities or values which are interpreted depending on the color space. For example, the color white in an RGB palette is (1, 1, 1) while this set of values in a CMY palette defines the color black. Each color in the palette is accessed using an index number, starting with 0 as the first color in the palette. The largest palette holds 256 colors, which is approximately the largest set of distinct colors the human eye can distinguish under normal viewing co ndi tio ns.
A color from a palette can be applied to either text or vector graphics using the Foreground Color command. Once the command is invoked the selected color will be applied to all text and vector graphics page marking primitives, and to a certain extent to raster images.
Palettes can be identified with a Palette ID and then stored and recalled as needed. A palette stack mechanism is also supported for the convenience of applications that work well with a graphics stack.

PCL 5 Color Graphics Context

The Palette acts as the focal point of the PCL 5 color graphics context. The color space, render algorithm, color treatment, and pixel encoding mode are stored along with the palette. Therefore, selecting or restoring a palette also restores these values.

PCL 5 Color Mode

The PCL language has four modes or ways of specifying and using color:
• Black-and-White (monochrome) mode is the default mode so that backward compatibility with previous printers is maintained. When the printer is turned on it has a 2-entry palette containing the color white at index 0 and black at index 1. When the printer is reset with an mode.
• Simple Color mode is entered with the Simple Color command, which creates one of three fixed color palettes:
z A monochrome, two-entry palette with white at index 0 and
black at index 1.
1-6 Color Printing Overview EN
?E it reverts to this
z An RGB, eight-entry palette with the following colors
starting at index 0: black, red, green, yellow, blue, magenta, cyan, and white.
z A CMY, eight-entry palette with the following colors
starting at index 0: white, cyan, magenta, blue, yellow, green, red and black.
• PCL Imaging mode is entered with the Configure Image Data command that creates a programmable palette of a programmed size. This palette can be programmed using the color component and set index commands.
• HP-GL/2 Imaging mode is entered when HP GL/2 mode is entered and the initialize command IN creates a programmable palette that is shared between PCL and HP-GL/2.
Any and all of the modes can be used on a page. For example, you could enter the Simple Color mode to print a headline and bar chart, PCL imaging mode to print a photographic image, and Black-and-White mode for the text on the page. Each mode is described in more detail in Chapter 2. “Using Color Modes.”

PCL 5 Raster Images

Monochrome PCL 5 raster images are made up of a series of zeros and ones. A one indicates that a black dot should be deposited, a zero indicates no dot, letting the white background show through. A one-inch wide image with a resolution of 600 dots per inch (DPI) has 600 consecutive zeros and/or ones, which represent a horizontal slice through the image starting at the left edge of the image. This slice is known as a raster row. For an image one inch high and one inch wide, at 600 dpi there are 600 hundred rows of 600 zeros and/or ones. Color raster images follow the same conventions with this major exception: the representation of a dot is changed from a single zero or one to a color specification (a pixel).

Pixels and Pixel Encoding

Raster images can be thought of as being composed of a series of pixels (picture elements). In the case of monochrome raster images, a pixel is a single bit which takes on a value of zero or one. In color images a pixel is essentially a color specification. However, there are several ways of specifying a color, and how the color is specified is called the Pixel Encoding Mode (PEM).
EN Color Printing Overview 1-7
The PCL 5 color command set supports several Pixel Encoding Modes. The PEMs are categorized first by whether the pixel is an index into a palette, or a color specification. The other PEM categorization is whether the pixel data is divided into planes and transferred one plane at a time or is transferred in sequential order. There are four supported Pixel Encoding modes:
1 Indexed by Plane 2 Indexed by Pixel 3 Direct by Plane 4 Direct by Pixel (also known as 24-bit direct).
For example, the format known as direct by plane, uses a 3-bit pixel where the first bit indicates the presence or absence of a red dot, the second a green dot and the third a blue dot. The data is still arranged in rows, but all the red data is sent, then the green and finally all the blue. The example below represents the commands to transfer an image with the direct by plane PEM. The underlined bits, while transferred separately, are logically from the same pixel.
?*b#V row 1 plane 1 (red) b1 b1 b1 b1 b1 b1... ?*b#V plane 2 (green) b2 b2 b2 b2 b2 b2... ?*b#W plane 3 (blue) b3 b3 b3 b3 b3 b3... ?*b#V row 2 plane 1 (red) b1 b1 b1 b1 b1 b1...
The direct by pixel PEM uses only the row transfer command. Each pixel is composed of three bytes, one byte per component of the color specification. All the bytes of a given pixel are transferred before the next one is transferred.
?*b#W row x b1 b2 b3 b1 b2 b3 b1...
The indexed by pixel PEM is similar to the direct pixel PEM but the pixel occupies at most one byte and is an index into the current palette.
The indexed by plane PEM is similar to the direct by plane PEM except the pixel's value is an index into the current palette. The use of this mode is discouraged due to the extra processing required to combine the bits from each plane into a single number, which is then used as an index into the current palette.
1-8 Color Printing Overview EN

Well-Behaved Raster

PCL raster images are processed most efficiently when the height and width of the image are specified before the Raster Start command begins an image data transfer. Furthermore, the entire image should be transferred before using the End Raster command to end the image. If the image is broken into pieces, certain print artifacts such as lines or squares can appear in the image. These can occur when “nearest neighbor operations” are applied to pixels that appear to be at the edge of an image, but are really inside an image that has been artificially broken up into smaller images.
EN Color Printing Overview 1-9
1-10 Color Printing Overview EN
2

Using Color Modes

Introduction

The PCL printer language has four color modes:
• Black-and-White
•Simple Color
• PCL Imaging
• HP-GL/2 Imaging
PCL allows you to use any mode or combination of modes to accomplish your printing objectives most efficiently.
All four of the color modes create a palette. The palette for each mode is discussed in the section describing that mode, and also in Chapter 3 (“Using Palettes”).
Black-and-White Mode (Default)
Black-and-White Mode is the default color mode. PCL devices power up in this mode and revert back to it whenever the printer receives an
?E reset. Black-and-White mode is also selectable using the Simple
Color command ( 2-pen palette, with white at index 0 and black at index 1 (compatible with existing monochrome PCL 5 printers).
Simple Color Mode
Simple Color Mode, entered by the Simple Color command (?*r#U), creates a fixed-size, fixed-color, unmodifiable palette. Depending on the value field, an 8-pen RGB palette, or an 8-pen CMY palette. When using the Simple Color mode, the pixel encoding mode is always indexed planar.
EN Using Color Modes 2-1
?*r1U). This mode creates an unmodifiable, default
?*r#U can create a 2-pen Black-and-White palette,
PCL Imaging Mode
PCL Imaging Mode, enabled by the Configure Image Data command (
?*v#W), allows a maximum of 24 bits per pixel for color
specification. Therefore, more colors may be specified than are obtainable in Simple Color Mode. In the PCL Imaging Mode, pixel encoding mode, bits per pixel, bits per primary, and the color palette are all programmable.
HP-GL/2 Imaging Mode
In HP-GL/2, the Initialize (IN) command starts color imaging and performs the following:
• Sets the pixel encoding mode to index by plane.
• Sets bits per index to 3.
• Creates an 8-pen palette that is reprogrammable in either PCL or HP-GL/2 contexts (see Chapter 3, “Using Palettes,” for more information).
Although default HP-GL/2 palettes are different than default PCL palettes, an HP-GL/2 palette is modifiable in either PCL or HP-GL/2 (using the Assign Color Index [ respectively). Likewise, a PCL palette created by the Configure Image Data command ( using the same commands.
?*v#W) is modifiable in both PCL and HP-GL/2
?*v#I] or Pen Color [PC] commands,
The active palette is always transferred between HP-GL/2 and PCL contexts. Since only one palette at a time can be active, a new palette created in either context overwrites the current palette.
2-2 Using Color Modes EN

Simple Color Mode

The Simple Color command (?*r#U) specifies color selection from a fixed palette. RGB or CMY raster data must be sent by plane (
?*b#V) as well as by row (?*b#W). The last plane in each row is
sent using the
?*b#V command. In Simple Color mode, the pixel encoding mode is
always indexed planar.
Simple Color Command
The Simple Color command creates a fixed-size palette, whose color specification cannot be modified.
?*r#U
# = –3 - 3 planes, device CMY palette
1 - Single plane K (Black) palette 3 - 3 planes, device RGB palette
Default =1
Range =–3, 1, 3
?*b#W command; all other planes are sent using the
This command destroys the active palette and creates a new palette, which becomes the active palette. When the Simple Color mode is active, PCL and HP-GL/2 commands that modify the palette are locked out (NP, PC, Color palette is popped from the stack ( modified, and the pixel encoding mode reverts to indexed planar.
• A value field of 1 creates a 2-entry Black-and-White default palette.
• A value field of 3 creates an 8-entry Device RGB palette (compatible with a PCL Imaging Mode palette, but not an HP-GL/2 default (IN) palette).
• A value field of –3 creates an 8-entry palette in Device CMY color space.
EN Using Color Modes 2-3
?*v#A, ?*v#B, ?*v#C, ?*v#I). When a Simple
?*p#P), it cannot be
The Simple Color palettes are structured as follows:
Single Plane (value = 1)
Index Color
0White 1Black
3-Plane RGB (value = 3)
Index Color
0Black 1Red 2Green 3Yellow 4Blue 5 Magenta 6Cyan 7White
3-Plane CMY (value = –3 )
Index Color
0White 1Cyan 2 Magenta 3Blue 4Yellow 5Green 6Red 7Black
2-4 Using Color Modes EN

PCL Imaging Mode

The PCL Imaging mode, entered using the Configure Image Data (CID) command ( palette. It provides multiple color spaces, pixel encoding modes, and reprogrammable palettes.

Configure Image Data (CID) Command

The CID command provides configuration information for creating palettes and transmitting raster data. The CID command performs the following:
• Designates the color space for the newly created palette
• Designates the size of the palette
• Designates the Pixel Encoding Mode, the format of the raster data
• Designates, in certain circumstances, the size, in bits, of the three components of the color specifications. However, this information is rarely useful since it applies only to the direct-by-pixel PEM, where the format must be eight bits per component for 24-bit direct color, and the direct-by-plane, where there is one bit per component.
?*v6W b0 b1 b2 b3 b4 b5
?*v#W), creates a variable-sized programmable
Where:
6 = The number of bytes following the “W” b0 = byte 0 The color space b1 = byte 1 The Pixel Encoding Mode b2 = byte 2 The number of bits per index which implies the
size of the palette
b3 = byte 3 The number of bits in color component
(primary) #1
b4 = byte 4 The number of bits in color component
(primary) #2
b5 = byte 5 The number of bits in color component
(primary) #3
EN Using Color Modes 2-5
The bytes are ordered as follows and are unsigned bytes:
Byte 15 (MSB) 8 7 0 (LSB) Byte
0 Color space Pixel encoding mode 1 2 Bits/index Bits/primary #1 3 4 Bits/primary #2 Bits/primary #3 5
Invalid configurations of the CID command are ignored and the data discarded. A minus or a plus sign in the value field (-6 or 6) is ignored
The data fields in the command, bytes zero to five, must contain byte-aligned binary data, not ASCII data.
Byte 0 (Color Space)
This byte specifies the color space. The range of values is 0 through
2. All other values are ignored.
Byte Value Color Space
0 Device Dependent RGB (default) 1 Device Dependent CMY 2 Standard RGB (sRGB)
Color space 2, sRGB, was the designation for Colorimetric RGB in the Color LaserJet an d C ol or L aserJet 5 print er s. The v alu e 2 i s us ed to represent sRGB since it is analogous to a standardized Colorimetric RGB and the intent of the two color spaces is the same.
2-6 Using Color Modes EN
Loading...
+ 256 hidden pages