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

Re: Colors and keyboard



On Thu, May 03, 2001 at 10:21:39PM -0700, Paschoud Alain wrote:
> hello,
> 
> I've two question. The first one concern a color problem which is not only
> cosmetic, but is really annoying. For example, when I launch "linuxconf" in
> X, a lot of error message appears in the shell, telling me that the color
> has not been allocated and that it will be replaced by black. Of course, the
> result is that I have only a black window at the end... Difficult to make
> configurations when I don't see anything. Does someone has an idea from
> where could come the problem ? 

 You're most likely running 8bit colour.  Run at a higher colour depth, or
don't use up so many colours before openning an xterm.  (colour allocation
in X works something like this, on a pseudocolor display (or other display
that uses a palette):  each of the 256 colours are indices into a table of
24bit RGB colour values.  When an app wants a colour, they ask the server
for the RGB colour they want, and if there is room in the colour table, the
server adds the new colour to the colour table and tells the app what index
value to use.  If there isn't, then it can use a colour that is close to the
desired one, or it can give up.  BTW, the table lookups for drawing on the
screen and stuff are all part of the video hardware, so the 8 bit colour
values get written straight to video RAM.  That's why colour cycling works
so well on 8bit colour displays: you just mess with the palette, you don't
have to redraw the whole screen.


-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter@llama.nslug. , ns.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BCE



Reply to: