pro setclrtab,clrtab,nlevels,ps=ps ; loadct,clrtab tvlct,r,g,b,/get nc = !d.table_size if (keyword_set(ps)) then begin ; white background, black foreground r(0) = 255 g(0) = 255 b(0) = 255 r(nc-1) = 0 g(nc-1) = 0 b(nc-1) = 0 endif else begin ; black background, white foreground r(0) = 0 g(0) = 0 b(0) = 0 r(nc-1) = 255 g(nc-1) = 255 b(nc-1) = 255 endelse tvlct,r,g,b ;tvlct,r[1:nc-1],g[1:nc-1],b[1:nc-1] ;tvlct,r,g,b,1 !p.color = nc-1 !p.background = 0 print,'setclrtab: nc=',nc,' !p.color=',!p.color,' !p.background=',$ !p.background,' !d.table_size=',!d.table_size end