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

EN Color Printing Overview (Color LaserJet, 5, 5M, DeskJet) A-5
Example:
Assuming the white and black references are set as follows:
Scenario 1
Scenario 2
Using these reference values, 50% blue for scenario 1 is 31, and 50%
blue for scenario 2 is 15.
Color Selection
The HP color printers offer two methods for selecting colors:
Indexed selection
Direct selection
In indexed selection, colors are chosen using their palette index
numbers. For non-raster mode, the palette index number is specified
using the Foreground Color command. In raster mode, the data bit
combination for each pixel forms an index number. The example
below shows how the index numbers for an 8-color palette are
specified:
White Reference Black Reference
red = 63 red = 0
green = 63 green = 0
blue = 63 blue = 0
White Reference Black Reference
red = 63 red = 4
green = 127 green = 0
blue = 31 blue = 0
Three-bit combinations: 0 1 0 1 0 1 0 1
0 0 1 1 0 0 1 1
0 0 0 0 1 1 1 1
Palette index number: 0 1 2 3 4 5 6 7