pro sct, lutname ;+ ; NAME ; sct ; ; PURPOSE ; Save colormap to a disk file. ; ; SYNTAX ; sct, 'rainbow' ; ; OUTPUT ; File "rainbow.lut" is written to disk. ; ; HISTORY ; 12 August 1996, 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 RGB values from colormap. tvlct, red, green, blue, /get ; --- Write colormap from ASCII file with the format: ; (4I4), index, red, green, blue lutname = lutname + '.lut' openw, 1, lutname for i = 0, 255 do $ begin c = index (i) r = red (i) g = green (i) b = blue (i) printf, 1, c, r, g, b endfor close, 1 end