;+ ; ; @file_comments ; Fastest than type loadct, file = 'palette.tbl' ; ; @categories ; Graphics, Color ; ; @param numpal {in}{optional} ; number of the color palette we want to select in the file palette.tbl ; ; @keyword LIGHTNESS ; a scalar used to change the Lightness of the color ; palette to be able to adjust according to the printer we use, ; the media (paper or slide)... ; lightness < 1 to get lighter colors ; > 1 to get darker colors ; ; @keyword FILE {default='palette.tbl'} ; The file containing the color palette. It can be in any directory of the !path ; ; @keyword GET_NAME ; Set this keyword to a named variable in which the names of the color tables ; are returned as a string array. No changes are made to the color table. ; ; @keyword _EXTRA ; Used to pass keywords to LOADCT ; ; @history ; ; - pinsardf 20120814T142936Z curie51.c-curie.tgcc.ccc.cea.fr (Linux) ; ; * not anymore set_plot, 'x' when !d.name = 'z' ; ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; 30/3/1999: add extra ; 6/7/1999: mac/windows compatibility ; ; @version ; $Id$ ; ;- PRO lct, numpal, FILE=file, GET_NAME=get_name, LIGHTNESS=lightness, _EXTRA=ex ; compile_opt idl2, strictarrsubs ; ; definition of the name of the file containing colors palettes. if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' ; look for nametbl file nametbl = find(nametbl, /firstfound, /nopro) if nametbl NE 'NOT FOUND' then BEGIN if n_elements(ex) NE 0 then $ if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl ; if arg_present(get_name) then begin if n_elements(numpal) EQ 0 then $ loadct, file = nametbl, GET_NAME = get_name, _EXTRA = ex $ ELSE loadct, numpal, file = nametbl, /silent, GET_NAME = get_name, _EXTRA = ex ENDIF ELSE BEGIN if n_elements(numpal) EQ 0 then loadct, file = nametbl, _EXTRA = ex $ ELSE loadct, numpal, file = nametbl, /silent, _EXTRA = ex ENDELSE ; if !d.name EQ 'PS' AND keyword_set(lightness) then palit, lightness ; ENDIF ELSE ras = report('The file containing the color palettes doesn''t exist...') return end