comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Device Independent Colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Device Independent Colors [message #15774] Tue, 08 June 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hi Folks,

As part of a continuing effort on my part to write programs
that behave in a device-independent way, I have upgraded my
GetColor program. In particular, I am interested in writing
programs in which I can specify colors without regard to
whether I am on an 8-bit or 24-bit display, or without regard
to whether color decomposition is on or off.

To that end, I have added new LOAD and START keywords to
GetColor that will automatically load the 16 McIDAS colors
available in GetColor in a manner in which they are device
and color decomposition independent.

For example, the following code will behave correctly
on 8-bit and 24-bit displays, no matter what the state of
color decomposition. (Please note that you can obtain the
color decomposition state only in IDL 5.2 and higher.)

colors = GetColor(/Load, Start=230)
Plot, data, Color=colors.yellow, Background=colors.gray
OPlot, data, PSym=4, Color=colors.green

You can find the GetColor program here:

http://www.dfanning.com/programs/getcolor.pro

Cheers,

David

P.S. As always, I'm looking for volunteer bug finders. :-)

--
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: figured it out
Next Topic: multiple Y-axis for 2D plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:51:43 PDT 2025

Total time taken to generate the page: 0.79948 seconds