macro PlotLut;
var
	boolean : made;
	integer : j,r,g,b;
	longint : i;
begin
	made:=NewData('LUT Plot',254,3,0,FALSE);
	if(!made)
		ShowError('Memory Low','Not enough memory to plot LUT colors');
		exit;
	endif;
	for(i,1,254)
		GetClutValues(i,r,g,b);
		PutDataNumber('LUT Plot',i,1,r);
		PutDataNumber('LUT Plot',i,2,g);
		PutDataNumber('LUT Plot',i,3,b);
	endfor; 
	SetPlot('LUT Plot',11);
	SetWindowSize('LUT Plot',410,254,FALSE);
	SetLinePlot('LUT Plot','PLAINLINE',TRUE);
	PlotData('LUT Plot',11,TRUE);
end;
