Modified replaceColorTable function.  Now accepts a table that has a different number of colors than the old, as long as the new one contains at least the colors contained in the old.