Number of colors in X display
grassp-list at max.cecer.army.mil
Thu, 12 Aug 1993 14:12:50 EST
Peter Briggs' response encouraged us to hunt a bit further, but
I am not convinced that the latter part of his explanation is correct:
the "rgb" set of files and programs is just to make a database to
allow a user to refer to colours using convenient names rather
than rgb values. As far as I can tell it does not have any effect
on the current display color lookup table.
Progress today has involved using the utility "xshowcmap" to watch the
evolution of the color table during a session. This utility is useful
as it changes dynamically to reflect the table that is currently active.
It appears that in "fixed" displaymode, the grass display uses some
rule to look for the closest color from the existing lookup table, and
that is then used. The grass tool d.colortable shows a table of colors
corresponding to the categories. With this I find that only about 20 different
colors are selected (to show 1000's of categories).
In "float" displaymode, it does generate a new set of colors,
but over half of the table is still black (which flashes
most of the rest of the openwindow display to black when the cursor
is moved into the display window!) d.colortable again shows only about
20 distinct colors for a few thousand categories
(though the xshowcmap shows over 100 colors for this colormap).
Basically, it appears that the procedures being used by grass's
xdriver for creating (or grabbing?) colours is not working in an
optimal way. Any comments, anyone?
Dr Simon Cox
,~' L_|\ Department of Earth Sciences
,-' \ Monash University
( \ Clayton Vic 3168 Australia
\ ___ /
L,~' "\_x/ Phone +61 3 565 5762
u Fax +61 3 565 5062