[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting the color pallete without calling LoadCT first
- Subject: Re: Getting the color pallete without calling LoadCT first
- From: Martin Schultz <martin.schultz(at)dkrz.de>
- Date: Mon, 20 Mar 2000 10:51:23 -0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: MPI fuer Meteorologie
- References: <B4FAF3E4.49F9%zamb@physics.ucla.edu>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:18957
Ricardo Fonseca wrote:
>
> Hi
>
> I need to get the color table from one of the default IDL colortables. Right
> now I'm doing it like this:
>
> loadct, ct, NCOLORS = 256
> TVLCT, rr, gg, bb, /get
>
> I was wondering I there was a way to do this without actually loading the
> color pallete i.e. without calling loadct
>
> Thanks in advance, Ricardo
not really. But why don't you do:
TVLCT, rold, gold, bold, /GET
loadct, ct, NCOLORS=256
TVLCT, rr, gg, bb, /GET
TVLCT, rold, gold, bold
which restores the original one with only two lines extra.
Also: if working on a 8 bit colordepth device you must be careful with
NCOLORS=256,
so perhaps you should select a different device before you do this
(off-hand I know of PS to always support 256 colors -- after
device,bits_per_pixel=8) but you could try others (e.g. the NULL device
??)
Cheers,
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[