No subject

Net.Noise owner news at
Thu Jul 8 00:01:34 EDT 1993

Newsgroups: info.grass.programmer
From: shapiro at (Michael Shapiro)
Subject: Re: Number of Colors Displayed
Message-ID: <C9tv6K.4JH at>
Sender: news at (Net.Noise owner)
Organization: US Army Corps of Engineers Construction Engineering Research Labs
References: <9307062110.AA08417 at>
Date: Thu, 8 Jul 1993 04:01:31 GMT
Lines: 29

In <9307062110.AA08417 at> lee at (Lilian LEE) writes:

>Greg Koerper from US EPA Environmental Research Lab wrote on May 6 that Grass
>is not displaying 256 colors on his monitor. I have the same problem on my
>SPARC10 using XDRIVE. Running Grass4.1, I displayed a LANDSAT image. When
>I use xv utility to grab the grass image, xv reports 8 colors. 
>Can anyone help me to have GRASS display 256 colors?

Greg is right. The cause is that GRASS also needs some of the 256
colors for vectors (~15) plus the XDRIVER tries to share colors with
other applications (thus reducing the number of color slots even more).
Usually this means about 220-230 colors. For maps that have a data
range with more than these number of colors GRASS uses a color cube
that fits with the number of colors (in this case, 6x6x6=216). The
fixed colormode always uses this color cube so that multiple maps
displayed in different frames can be seen at the same time and share a
commonm color scheme. The float colormode will switch to fixed if the
number of colors is too many - except for grey scale images. Then float
mode will rescale the grey's to use all the available colors.  So for
grey scale images you can get more colors (in float mode) but you will
only get 6 in fixed mode (since there a 6 grey colors in the 6x6x6
color cube). For color images, there is no trick to be played so you
only get a fixed set of colors (eg, 216).
Michael Shapiro               shapiro at
U.S. Army CERL                (217) 373-7277
P.O. Box 9005 
Champaign, Ill. 61826-9005

More information about the grass-dev mailing list