h6. [[ColourTrans]] h6(. » [[ColourTrans Technical Details|Technical Details]] h6((. » Colour Calibration h2(#colour_mapping). Colour Mapping Colour calibration is achieved by the ColourTrans module using a table that maps device colours (physical colours) to standard colours. When requesting a colour, ColourTrans takes the palette colour and uses a calibration table to convert the device colours to standard colours, giving a transient palette that maps logical colours to standard colours. The closest match to the standard colour is then selected. See [[ColourTrans Transfer Function]] and [[Colour Mapping Descriptor]] for more details. h2(#calibration_tables). Calibration Tables A calibration table is used to map device colours to standard colours. Three separate mapping exist for each component of the device space. e.g red, green and blue on a monitor. Each mapping consists of a series of device component/standard colour pairs. The format of the pairs is <code>&BBGGRRDD</code> Where: |<^. <code>BBGGRR</code>|<^. Standard colour (Blue, Green and Red)| |<^. <code>DD</code>|<^. Amount of device component| The calibration table format is as follows: |_<^{width:8em}. Word|_<^. Meaning| |<^. 0|<^. Number of pairs of component 1 (n<sub>1</sub>)| |<^. 1|<^. Number of pairs of component 2 (n<sub>2</sub>)| |<^. 2|<^. Number of pairs of component 3 (n<sub>3</sub>)| |<^. 3|<^. n<sub>1</sub> words giving pairs for component 1| |<^. 3 + n<sub>1</sub>|<^. n<sub>2</sub> words giving pairs for component 2| |<^. 3 + n<sub>1</sub> + n<sub>2</sub> |<^. n<sub>3</sub> words giving pairs for component 3| The size of the table is therefore 3 + n<sub>1</sub> + n<sub>2</sub> + n<sub>3</sub> words. The three separate mappings for each device component must be sorted in ascending order. To fill the device colour space there must be entries for device components of 0 and 255. This results in at least two pairs for each component. An example of a calibration table is shown below. |_<^{width:3em}. Word|_<^. Meaning| |<^. &00000002|<^. 2 pairs of red component| |<^. &00000002|<^. 2 pairs of green component| |<^. &00000002|<^. 2 pairs of blue component| |<^. &02010300|<^. Device colour 000000 corresponds to standard colour &020103| |<^. &0203FDFF|<^. Device colour 0000FF corresponds to standard colour &0203FD| |<^. &02010300|<^. Device colour 000000 corresponds to standard colour &020103| |<^. &03FC02FF|<^. Device colour 00FF00 corresponds to standard colour &030FC02| |<^. &02010300|<^. Device colour 000000 corresponds to standard colour &020103| |<^. &FF0302FF|<^. Device colour FF0000 corresponds to standard colour &FF0302| The default mapping is for device colours and standard colours to be the same. ColourTrans converts a device colour to a standard colour by the following process: # Splits the device colour into its three component parts # Looks up each component in the calibration table # Entries not found in the table is calculated by performing a linear interpolation between the two device components 'surrounding' the required device component # The standard colour obtained for each component is then added together to give the final calibrated standard colour