[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

color resources problem



Hello !

After struggling a while with X on an 8bit monitor and it's colormap on 5.3,
we decided to write our programs the elegant way as described in the IDL manual:

"If you wish to specify unique colors for your widgets, it is generally a good
idea to use a color name ("red" or "lightblue", for example) rather than
specifying an exact color match with a color string (such as "#b1b122222020").
If IDL is not able to allocate an exact color, the entire operation may fail.
Specifying a named color implies "closest color match," an operation that RARELY
FAILS."

We did it, and we found out that this technique almost ALWAYS FAILS ! The
most remarkable oddity is that we can specify "#0000FF" exactly and get
blue, but specifying "blue" fails for whatever reason, though this color
is exactly defined as "0 0 255 blue" in the X rgb.txt file ! We tried a couple
of more or less exotic colors, but most of them fail with a
'Warning: Cannot allocate colormap entry for "xxx"'. !d.n_colors is 
around 160, and we even loaded a couple of color tables, but
nothing helps. Of course we did a 'device, decomposed=0', and we are
shure that we also set up correctly the resources with xrdb and triple 
checked the code. 

Is there anything we miss ? Some secret passage somewhere hidden in the
manuals ? Or is this just another bug ?
-- 
Dr. Udo Grabowski                           email: udo.grabowski@imk.fzk.de
Institut f. Meteorologie und Klimaforschung II, Forschungszentrum Karslruhe
Postfach 3640, D-76021 Karlsruhe, Germany           Tel: (+49) 7247 82-6026
http://www.fzk.de/imk/imk2/ame/grabowski/           Fax:         "    -6141