Re: Trivial colour table problem [message #41645] |
Wed, 03 November 2004 09:45 |
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
|
|
|