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 #32189 is a reply to message #32188] Fri, 20 September 2002 12:43 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Miklos Z. Kiss (mzkiss@unity.ncsu.edu) writes:

> 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.

OK, sigh...

TVLCT, 0, 0, 0, 0 ; Black
TVLCT, 255, 255, 255, 255 ; White
TVLCT, Congrid(bytarr(256), 253), $
Congrid(bindgen(256), 253), $
Congrid(bindgen(256), 253), 1

And

TVLCT, Congrid(bindgen(256), 253), $
Congrid(BytScl(bindgen(256), top=165), 253), $
Congrid(bytarr(256), 253), 1

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: Fri Oct 10 00:40:03 PDT 2025

Total time taken to generate the page: 1.84030 seconds