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

Home » Public Forums » archive » Re: custom color table
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: custom color table [message #32191 is a reply to message #32189] Fri, 20 September 2002 12:00 Go to previous messageGo to previous message
Miklos Z. Kiss is currently offline  Miklos Z. Kiss
Messages: 7
Registered: April 2001
Junior Member
Many thanks. On these types of monochrome scales, color #0 is black (0, 0,
0), and color #255 is cyan (0, 255, 255) or orange (255, 165, 0). Is there
a simple, or at least, a systematic, way to make a color table in which
color #0 is black, color #255 is white, and everything in between is the
shade of some the color in question? I am thinking of the way IDL's
predefined color tables are, such as color tables, 0, 1, 3, and 8. I guess
technically speaking this would be more of a quasi-monochrome color table.
Thanks again.

-Mik



"David Fanning" <david@dfanning.com> wrote in message
news:MPG.17f517db4ea2d0509899b6@news.frii.com...
> Miklos Z. Kiss (mzkiss@unity.ncsu.edu) writes:
>
>> I am trying to create a custom monochrome color table in IDL. IDL has
four
>> (maybe five) predefined monochrome color tables (gray scale, red
>> temperature, blue-white, and green-white). XPALETTE will allow me to
create
>> a custom color table, and I can load it using TVLCT, but how do I relate
the
>> red, green, and blue channels mathematically to create a, say, orange,
or
>> cyan monochrome color table?
>
> The color cyan is (0, 255, 255), so a monochrome cyan
> color table is this:
>
> TVLCT, bytarr(256), bindgen(256), bindgen(256)
>
> The color orange is (255, 165, 0), so a monochrome orange
> color table is this:
>
> TVLCT, bindgen(256), BytScl(bindgen(256), top=165), bytarr(256)
>
> Cheers,
>
> David
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL Student Edition released
Next Topic: cyclic colour tables?

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

Current Time: Sat Oct 11 13:44:15 PDT 2025

Total time taken to generate the page: 0.00907 seconds