GetSubTable
GetSubTable Map RGB from color table to nearest match on target table
#include <Quickdraw.h> Color Manager
void GetSubTable(myColors, iTabRes, targetTbl );
CTabHandle myColors ; handle to a source color table
short iTabRes ; controls the resolution of the inverse table
short targetTbl; table for which colors are being matched
GetSubTable maps colors between two or more color tables, returning the
nearest matches in myColor's colorSpec.value fields, and placing the returned
indices into targetTbl.
myColors is a handle to a ColorTable.
iTabRes specifies the resolution of a temporary inverse color table.
targetTbl is the target table for which each RGB value is being matched.
Returns: none

Notes: GetSubTable uses myColors to show the address of a ColorTable,
maps each RGB value to its closest equivalent for each target table,
and returns these approximations in myColor's colorSpec. value
fields. The colors are chosen using Color2Index. GetSubTable
builds and then discards a temporary inverse table (which requires
memory in the application heap equivalent to twice the size of the
table, plus a fixed overhead for each inverse table resolution of 3 to
15K bytes). ITabRes controls the temporary inverse table's
resolution. The only time your application doesn't build a temporary
table is if the targetTbl is NIL. In that case, the current gDevice's
color table is used--along with its inverse table. You can pass an
explicit targetTbl parameter (other than NIL) if you want to provide
a resolution different than the current inverse table.