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

EN Using Color Modes (Color LaserJet, 5, 5M, DeskJet) B-25
Examples Using the CID Command
The following examples illustrate using the CID command's short and
long forms for each color space. For clarity, data is shown as ASCII,
rather than binary and the CID command (
?*v#W) is shown as
“CID”. The following format is used:
CID ( data , data , . . . )
Device RGB or Device CMY
SHORT FORM
Example:
The short form CID command, as a C function, can look like this:
short_cid(Color_mode, Pixel_mode, BitsperIndex,
BitsperColor_1, BitsperColor_2, BitsperColor_3)
{
int Color_mode, Pixel_mode, BitsperIndex,
BitsperColor_1, BitsperColor_2, BitsperColor_3;
printf(“\033*v6W%c%c%c%c%c%c”,Color_mode,
Pixel_mode, BitsperIndex, BitsperColor_1,
BitsperColor_2, BitsperColor_3);
}
LONG FORM
CID(0,1,8,8,8,8) Device RGB, 8 bits/pixel indexed
CID(1,1,8,8,8,8) Device CMY, 8 bits/pixel indexed
CID(0,1,8,8,8,8, Device RGB, 8 bits/pixel indexed
0,0,0 White reference
100,100,100) Black reference