Re: self made color tables [message #40954] |
Tue, 21 September 2004 06:30  |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <b3eff7b0.0409210059.3ee72e0a@posting.google.com>, "michele"
<gnarloo@libero.it> wrote:
> i know modifyct but the problem is always there: you have to type in
> manually all the triplets. if i have to type in the triplets,
> i can do that: i write a text file with the triplets, read them and load
> em with tvlct and i also avoid the problem of updating or writing a new
> tlb file...
> i simply expect xpalette to have a button with SAVE and then i type in a
> color table number, say 41, and then i load it with loadct... the
> problem is that typing the triplets in is time consuming... or , another
> way to solve the problem, is there a way to get the triplets
> automatically from xpalette to be used in modifyct?
TVLCT, R, G, B, /GET
will load the RGB triplets into the R,G and B variables, which you can
then write to a file if you want (if you don't want to make a new color
table file), no typing needed (well, some).
You can't load color table 41 from the default file(it's my default file to...), but you can
use modifyct to make a brand new color table file, and use loadct to
read table 41 from that, if you want 1..39 as the default, then copy the 39 color tables
from the old color table to the new one.
Chris.
|
|
|
Re: self made color tables [message #40956 is a reply to message #40954] |
Tue, 21 September 2004 06:18   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
michele writes:
> i know modifyct but the problem is always there:
> you have to type in manually all the triplets. if i have to type in
> the triplets,
> i can do that: i write a text file with the triplets, read them and
> load em with tvlct and i also avoid the problem of updating or writing
> a new tlb file...
>
> i simply expect xpalette to have a button with SAVE and then i type in
> a color table number, say 41, and then i load it with loadct...
>
> the problem is that typing the triplets in is time consuming...
> or , another way to solve the problem,
> is there a way to get the triplets automatically from xpalette to be
> used in modifyct?
Typing them in manually!? Is that a typewriter you are using? :-)
Try this:
XPalette ; Get the color tables the way you want them.
TVCLT, r, g, b, /Get ; Get the color table vectors.
ModifyCT, 42, 'mycolors', r, g, b
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|
|
|
Re: self made color tables [message #41092 is a reply to message #40954] |
Wed, 22 September 2004 07:02  |
gnarloo
Messages: 14 Registered: June 2004
|
Junior Member |
|
|
thanks christopher and david, i didn't understand that adding /get to
tvlct would load the present internal color table and fill in the r g
b triplets automatically.
now everything is clear...
ciao
michael
|
|
|