Creating a color mapping table

In the procedure described below, we create a color mapping table to print an Advanced Function Presentation (AFP) file that contains pie charts in the color green.

For our AFP files, this pie chart appears as a series of horizontal lines. By accessing the chapter on "Graphic primitives and attributes" in Graphics Objects Content Architecture for Advanced Function Presentation Reference, we can see that these horizontal lines are created by a Pattern Output Primitive with a hexadecimal value of '0B'(11).

To turn these horizontal lines into a shade of green when using a ColorSpace source group of GOCA to map to a target group value of RGB, make sure that you specify a low value for red (12), a high value for green (252), and a value under 50 for blue (42) to provide a clear contrast.

You must do these tasks from the Linux command line:

  1. From the usr/lpp/psf/config directory, specify:
    cp cmt.cfg piel.cfg
    This copies the Color Mapping Table configuration file into a file you can customize for your own purposes (in this case, pie1.cfg)
  2. Specify vi piel.cfg.

    This lets you edit the configuration file and insert the applicable values to create the appropriate color mapping (whether GOCA to RGB or OCA to CIELAB) table. See the sample cmt.cfg configuration file below:

    # ******************************************************-
     # Required, starts  a Color Mapping Definition.
     # One definition for each Source to Target mapping.
    # ******************************************************-
    # ******************************************************-
     # BeginSourceDef:
     # Required, starts the Source Parameters
    # ******************************************************-
    	BeginSourceDef:
    	# ******************************************************-
    	# ColorSpace:
    	# Required, values= OCA | Highlight | GOCA
    	# ******************************************************-
    	ColorSpace: GOCA
    	# ******************************************************-
    	# ColorValue:
    	# Required, values depend on Color Space
    	# ******************************************************-
    	ColorValue: 11
    	# ******************************************************-
    	# ObjectType:
    	# Optional, values= ObjArea | ImageData | PTOCData |
    	#	GOCAData | BCOCAData | AllOCA | Page | Overlay |
    	#	ObjsAll
    # default= ObjsAll
    # ******************************************************-
    ObjectType: GOCAData
    		# ******************************************************-
    		# PercentShading:
    		# Optional, only valid for SourceColorSapce: Highlight,
    		# values= 0 .. 100, 255 (all percentages),
    		# default= 100
    		# ******************************************************-
    		# PercentShading:
    		# ******************************************************-
    		# PercentCoverage:
    		# Optional, only valid for SourceColorSpace: Highlight, 
    		# values= 0 .. 100, 255 (all percentages),
    		# default= 100
    		# ******************************************************-
    		# PercentCoverage:
    	# ******************************************************-
    	# EndSourceDef:
    	# Required, ends the Source Parameters
    	# ******************************************************-
    	EndSourceDef:
    	# ******************************************************-
    	# BeginTargetDef:
    	# Required, starts the Target Parameters
    	# ******************************************************-
    	BeginTargetDef:
    		# ******************************************************-
    		# ColorSpace:
    		# Required, values= RGB | CMYK | Highlight | CIELAB
    		# ******************************************************-
    		ColorSpace: RGB
    		# ******************************************************-
    		# ColorValue:
    		# Required, values depend on Color Space
    		# ******************************************************-
    		ColorValue: 12 252 42
    		# ******************************************************-
    		# PercentShading:
    		# Optional, only valid for TargetColorSpace: Highlight, 
    		# values= 0 .. 100, default= 100
    		# ******************************************************-
    		# PercentShading:
    		# ******************************************************-
    		# PercentCoverage:
    		# Optional, only valid for TargetColorSpace: Highlight,
    		# values= 0 .. 100, default= 100
    		# ******************************************************-
    		# PercentCoverage:
    	# ******************************************************-
    	# EndTargetDef:
    	# Required, ends the Target Parameters
    	# ******************************************************-
    	EndTargetDef: 
    # ******************************************************-
    # Required, ends a Color Mapping Definition.
    # ******************************************************-
    # EndMappingDef:
    
  3. Once you have finished editing the pie1.cfg file, save the file.
  4. To create the Color Mapping Table object (MODCA) file that will be used when you submit the job for printing, run the cmt Utility as the input file (-i flag):

    cmt -i pie1.cfg -o pie1.set

    This command produces a pie1.set output file.

  5. To verify your color mapping table values, or to create a configuration file from a MODCA object file, specify the cmt utility again, using the newly created pie1.set as the input file and pie2.cfg as the output file:

    cmt -i pie1.set -o pie1.cfg

    Note: pie2.cfg is specified so that you don't overwrite the original file. You can then compare pie1.cfg to pie2.cfg.

  6. Before you try to use this color mapping table to submit a job to InfoPrint Manager, verify that the source file contains the intended values. In this case, the pie1.cfg file should resemble this example, where the source definition represents the input file (in this case AFP) that you are converting to the target definition (an RGB color value of green):
    BeginMappingDef:
    	BeginSourceDef:
    		ColorSpace: GOCA
    		ColorValue: 11
    		ObjectType: GOCADATA
    	EndSourceDef:
    	BeginTargetDef:
    		ColorSpace: RGB
    	 	ColorValue: 12 252 42
     	EndTargetDef:
    EndMappingDef:																																				
  7. Once you have verified the contents of the source file, see the section below.