;+ ; NAME: ; LOADHLS8 ; PURPOSE: ; EMUTEK ONLY ; Load new color table (8 colors) ; CALLING SEQUENCE: ; loadhls8, TABLE ; INPUTS: ; TABLE color table index ; CALLS: ; TWIN ; SIDE EFFECTS: ; > TWIN is called to make sure the terminal is in graphics mode ; > !p.color is set to white ; RESTRICTIONS: ; No action is taken if TABLE is not a valid color table index ; PROCEDURE: ; MODIFICATION HISTORY: ; APR-1993, Paul Hick (UCSD); adapted from F77 GRPACK routine CMAP ;- pro LOADHLS8, TABLE case TABLE of -1: begin ;------- Table -1. Default color table ; (black,white,red,green,blue,cyan,magenta,yellow) IH = [0, 0,120,240, 0,300, 60,180] IL = [0,100, 50, 50, 50, 50, 50, 50] IS = [0, 0,100,100,100,100,100,100] end 0: begin ;------- Table 0. Default color table with white as last color ; (black,red,green,blue,cyan,magenta,yellow,white) IH = [0,120,240, 0,300, 60,180, 0] IL = [0, 50, 50, 50, 50, 50, 50,100] IS = [0,100,100,100,100,100,100, 0] end 1: begin ;------- Table 1. Reduced STD GAMMA-II (IDL table 5) IH = [0,240,245,327, 7, 35, 60, 0] IL = [0, 35, 48, 21, 50, 57, 52,100] IS = [0,100,100,100,100,100, 80, 0] end 2: begin ;------- Table 2. 'Cool' colors ; IH = [0,240,240,245,272,327, 0,345] ; IL = [0, 17, 35, 48, 30, 21, 38, 70] ; IS = [0,100,100,100,100,100,100,100] IH = [0,240,240,245,272,327, 0, 8] IL = [0, 17, 35, 48, 30, 21, 38, 50] IS = [0,100,100,100,100,100,100,100] end 3: begin ;------- Table 3. 'Hot' colors ; ??? Background: 22,57,100 instead of 0,0,0 IH = [0, 65, 40, 60, 60, 60, 60, 0] IL = [0, 38, 40, 52, 68, 78, 89,100] IS = [0,100, 88, 80,100,100,100, 0] end else: message, 'Invalid color table' endcase WHITE = where ( IH eq 0 and IL eq 100 and IS eq 0 ) WHITE = WHITE(0) & if WHITE eq -1 then WHITE = 7 !p.color = WHITE ESC = string(27B) MAP = ESC+'TM@@3@@1@@1'+ESC+'TG@@1@B0' for I=0,7 do MAP = MAP+CENCIN(I)+CENCIN(IH(I))+CENCIN(IL(I))+CENCIN(IS(I)) twin, 1 ; Make sure graphics screen is active print, MAP ; Load new color table return & end