pro lct, lutname ;+ ; NAME ; lct ; ; PURPOSE ; Load colormap from disk file. ; SYNTAX ; lct,'grey.lut' ; ; HISTORY ; 19 April 1995, Andrew L. Stanger ;- ;--- Declare storage variables. index = bytarr (256) red = bytarr (256) green = bytarr (256) blue = bytarr (256) c = byte (0) r = byte (0) g = byte (0) b = byte (0) ; --- Read colormap from ASCII file with the format: ; (4I4), index, red, green, blue close, 1 openr, 1, lutname for i = 0, 255 do $ begin readf, 1, c, r, g, b index (i) = c red (i) = r green (i) = g blue (i) = b endfor ; --- Write RGB values to colormap. tvlct, red, green, blue close, 1 end