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

Home » Public Forums » archive » Re: Trivial colour table problem
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
Re: Trivial colour table problem [message #41645] Wed, 03 November 2004 09:45
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> I would be extremely grateful if anybody can help me with this trivial
> Colour Table problem:
>
> I have a pre-defined colour table (RAINBOW - 13), but only want to use
> some of the 256 available colours. The colours I want to use are the
> following:
> a) from 80 to 110 (shades of blue)
> b) from 128 to 144 (shades of green)
> c) from 188 to 200 (shades of yellow)
> d) from 208 to 240 (shades of red)
> for a total of 90 colors.
>
> What I would like to do is to construct a colour table with the
> aforementioned 90 colours ordered sequentally (say from 0 to 89) and
> the remaining 166 white.

loadct, 13
tvlct, r, g, b, /get
r_new = [r[80:110], r[128:144], r[188:200], r[208:240], $
replicate(255, 166)]
g_new = [g[80:110], g[128:144], g[188:200], g[208:240], $
replicate(255, 166)]
b_new = [b[80:110], b[128:144], b[188:200], b[208:240], $
replicate(255, 166)]
tvlct, r_new, b_new, g_new


-Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Trivial colour table problem
Next Topic: Help Plotting Cylinders in 3D

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

Current Time: Sun Oct 12 15:00:45 PDT 2025

Total time taken to generate the page: 1.52195 seconds