WHILE restLeng >= wordsForCMap-2
DO
cm: StandardColorMap ¬ NEW[StandardColorMapRec];
cm.colormap ¬ [s[restStart+0]];
cm.redMax ¬ s[restStart+1];
cm.redMult ¬ s[restStart+2];
cm.greenMax ¬ s[restStart+3];
cm.greenMult ¬ s[restStart+4];
cm.blueMax ¬ s[restStart+5];
cm.blueMult ¬ s[restStart+6];
cm.basePixel ¬ s[restStart+7];
IF idxForVisualId < restLeng
THEN cm.visualId ¬ [s[restStart+idxForVisualId]]
ELSE cm.visualId ¬ Xl.QueryScreen[c, w].rootVisual;
IF idxForKillId < restLeng
THEN cm.killId ¬ s[restStart+idxForKillId]
ELSE cm.killId ¬ Xl.nullID;
restLeng ¬ restLeng-wordsForCMap;
restStart ¬ restStart+wordsForCMap;
list ¬ CONS[cm, list];
ENDLOOP