
;;
;; eis_colors - load different color tables for displaying EIS moments.
;;
;; Keywords:
;;
;;        intensity - light green color table (default)
;;        velocity  - red to white to blue color table
;;        width     - black and yellow color table
;;        dark      - (use with velocity) black at both ends of the color table
;;
;; Example:
;;
;;       IDL> eis_colors,/velocity,/dark
;;
;; Notes:
;;
;;       The file eis_colors.genx contains the colors and must be in the same directory as
;;       this routine. Uses "find_with_def" to search the path.
;;
;; History:
;;
;;       HPW: Written, ?
;;       HPW: 10-MAY-2010. Added dark option
;; 

pro eis_colors,width=width,intensity=intensity,velocity=velocity,$
               dark=dark,$
               r=r,g=g,b=b

  case 1 of
    keyword_set(intensity): i = 0
    keyword_set(velocity): i = 1
    keyword_set(width): i = 2
    else: i = 1
  endcase

  if keyword_set(velocity) AND keyword_set(dark) then i = 3

  file = find_with_def('eis_colors.pro',!path)
  file = str_replace(file,'.pro','.genx')
  restgen,r,g,b,file=file

  r = reform(r[i,*])
  g = reform(g[i,*])
  b = reform(b[i,*])
  
  r[255] = 255
  g[255] = 255
  b[255] = 255

  tvlct,r,g,b

return
end
