pro loadlut1,file ; ; load a lookup table (LUT) from a file ; ; courtesy of Gui ; motified by Dan ; motified by RAD 1/25/94 ; common colors,r_orig,g_orig,b_orig,r_curr,g_curr,b_curr openr,unit,file,/get_lun ; size=!d.table_size size=256 cn = bytarr(1) r = bytarr(size) g = bytarr(size) b = bytarr(size) ; for i = 0,255 do begin readf,unit,format='(i3,2x,i3,2x,i3,2x,i3)',cn,rr,gg,bb r(i)=rr g(i)=gg b(i)=bb endfor tvlct,r,g,b r_curr = r g_curr = g b_curr = b r_orig = r g_orig = g b_orig = b ; free_lun,unit return ; end