Re: trouble with color table on NT [message #22445] |
Mon, 13 November 2000 00:00 |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
He is a liitle RSI tip that I use on occasions.
=========================================================
;
; Load discrete color table.
;
tek_color
;
; Match color indices to colors we want to use
;
IF ( !D.N_COLORS GT 256 ) THEN BEGIN
TVLCT, RedTable, GreenTable, BlueTable, /GET
black = ( 256L * BlueTable(0) + GreenTable(0) ) * 256L + RedTable(0)
white = ( 256L * BlueTable(1) + GreenTable(1) ) * 256L + RedTable(1)
red = ( 256L * BlueTable(2) + GreenTable(2) ) * 256L + RedTable(2)
green = ( 256L * BlueTable(3) + GreenTable(3) ) * 256L + RedTable(3)
dk_blue = ( 256L * BlueTable(4) + GreenTable(4) ) * 256L + RedTable(4)
lt_blue = ( 256L * BlueTable(5) + GreenTable(5) ) * 256L + RedTable(5)
ENDIF ELSE BEGIN
black=0 & white=1 & red=2 & green=3 & dk_blue=4 & lt_blue=5
ENDELSE
;
;
=======================================================
This came from one of their Newsletters that arrived in the mail along time
ago.
However, recently, I use the DEVICE, DECOMPOSE=0
Kelly Dean
CSU/CIRA
Peter Brooker wrote:
> I have written a program in idl that uses the command
>
> loadct, 39
>
> This loads the "rainbow + white" colors table with 220 colors avalilabe.
> This program runs fine if I set the colors on my NT to 256 colors but
> does not run with 65k colors.
>
> Is there a way to program so that IDL work with 65k colors the same way
> as it works for 256 colors?
>
> thanks-Peter Brooker
|
|
|
Re: trouble with color table on NT [message #22459 is a reply to message #22445] |
Sun, 12 November 2000 23:48  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Peter Brooker wrote:
>
> I have written a program in idl that uses the command
>
> loadct, 39
>
> This loads the "rainbow + white" colors table with 220 colors avalilabe.
> This program runs fine if I set the colors on my NT to 256 colors but
> does not run with 65k colors.
>
> Is there a way to program so that IDL work with 65k colors the same way
> as it works for 256 colors?
>
> thanks-Peter Brooker
Did you tried
device,decompose=0 ?
regards
Reimar
|
|
|
Re: trouble with color table on NT [message #22462 is a reply to message #22459] |
Sun, 12 November 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Peter Brooker (ra5589@email.sps.mot.com) writes:
> I have written a program in idl that uses the command
>
> loadct, 39
>
> This loads the "rainbow + white" colors table with 220 colors avalilabe.
> This program runs fine if I set the colors on my NT to 256 colors but
> does not run with 65k colors.
>
> Is there a way to program so that IDL work with 65k colors the same way
> as it works for 256 colors?
Sigh...
I've really got to spend less time writing color tools
and more time marketing my book and web page. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|