Re: FVWM: Re: Colormap issues

From: Olivier Chapuis <olivier.chapuis_at_free.fr>
Date: Tue, 1 Oct 2002 23:32:11 +0200

On Tue, Oct 01, 2002 at 10:30:48AM -0700, Tim Freedom wrote:
> On 1 Oct 2002 08:37:31 +0200, Olivier Chapuis wrote:
> >
> > [snip snip]
> > >
> > > are very different in tone/color. A case in point, the clamp.xpm is
> > > yellowish in color when it should really be brown. If I invoke 'xv'
> > > from the command line and look at clamp.xpm, it looks fine (its brownish).
> > > I don't have any "colormap" commands in my .fvwm2rc file (FWIW).
> > >
> > [snip snip]
> > >
> > > + snap-20020720: exhibits problems, faded + FvwmPager is green-puke color
> > > + snap-20020715: Works great
> >
> > Not exactly I think. In what follow I assume that you have a screen
> > which supports only 256 colors (8 bit depth). Can you confirm this?
>
> Here's the output of 'xdpyinfo'
>
> screen #0:
> dimensions: 1280x1024 pixels (361x289 millimeters)
> resolution: 90x90 dots per inch
> depths (3): 1, 8, 24
> root window id: 0x29
> depth of root window: 8 planes
> number of colormaps: minimum 1, maximum 1
> default colormap: 0x20
> default number of colormap cells: 256
> preallocated pixels: black 0, white 1
> options: backing-store YES, save-unders YES
> largest cursor: unlimited
> current input event mask: 0xd8003d
> KeyPressMask ButtonPressMask ButtonReleaseMask
> EnterWindowMask LeaveWindowMask SubstructureNotifyMask
> SubstructureRedirectMask PropertyChangeMask ColormapChangeMask
> number of visuals: 5
> default visual id: 0x22
> visual:
> visual id: 0x22
> class: PseudoColor
> depth: 8 planes
                ^^^^^^^^

> available colormap entries: 256
                                     ^^^

>
> I believe I have a raptor graphics card that is supposed to support alot
> more than 256 colors, anyone know how to alter this setting (or to verify
> that I'm capable of that) ?
>

I do not know how many colors can support your card but you run it
with 256 colors only. I know nothing about X with Solaris but with
XFree you can either pass an option to your Xserver (via startx) or
edit the XF86Config config file to set the depth. With XFree-3 the
option is -bpp the_depth, with XFree-4 it is -depth the_depth. Typical
depth are 2 (2 colors), 4 (8 colors), 8 (256, colors your case), 15
(2^15 colors), 16, 24 and 32. Try man X and man startx. Let us
know if you found the trick.

> > The point is that a new color limit method has been implemented for
> > such a screen. New colors tables are used so that it is possible to
> > use gradient in such screens (and use bg pixmap with a lot of close
> > colors in Colorset). One pb with these new tables is that they have
> > not enough grey (so the pb with the calc icon). This may be fixed in
> > the future. Also colors approximation formulae has changed and I am not
> > sure that the new one are so good. But remember that with a 8 bit depth
> > screen fvwm will never use true colors for icons but colors in a table
> > (and any reasonable app will do the same things with such screens, if
> > it has to display a lot of colors).
> >
> > You can still use the "old" table by using the following option
> > -color-limit 61. Moreover, when the "old" table was build I think that
> > the (IMHO ugly, do you try wm-icons package :o) icons you use was used
> > for testing. Unfortunately, you can still have "pbs" because colors
> > approx was done in a different way (BTW, in two steps one by fvwm and
> > the other by the xpm lib).
>
> I'll grab the "beautiful" wm-icons to see what you are talking about :-)
> Are you saying that the icons there will not exhibit this problem (use
> less gray ?) or simply that they look nicer ?
>

I simply say that IMHO they look nicer.

> > You may alos try to use dithering: use Colorset in your FvwmButtons:
> >
> > Colorset 10 bg grey, fg white, ditherIcon
> >
> > *FvwmButtons: Colorset 10
> > # remove the Back and Fore colors option
> > # ... your config
>
> That looked horrid, so I opted for
>
> Colorset 10 bg grey59, fg white, ditherIcon
>
> but that still showed the same problem (in both rcalc.xpm and clamp.xpm)
>

I do not think it will "solve" your pbs. The icons will look
different. It does not work as there is a bug in the code (at present
time it works only when the button has the Colorset:
*FvwmButtons: (Colorset 10, Icon rcalc.xpm, ...).
This will be fixed in an incomming snapshot.
 
> > and start fvwm without the "-color-limit" option
> > (DitherIcon/NoDitherIcon are not dynamic, you should restart the
> > Buttons after a change). BTW, ditherIcon is an undocumented Colorset
> > option because maybe it will be removed. Also, there are not enough
> > doc about the -color-limit option as the code is not finished.
>
> Well, in short I don't use gradients (as I see that its a nicety that I
> can certainly live without), but I do expect to see my limited 8 icons
> to be displayed correctly.

This is a bit arbitrary. The 61 colors tables make a good
approximation of your icons, but the 64 colors table (the default one)
does not make your icons ugly (ask someone which never see these icons
if one of the two FvwmButtons screen shot that you send to the list is
really better than the other one). Also the 64 colors table is a
standard (can be use by gtk, qt and maybe java if you know how to
configure these "libs" and this is important when you need to share
256 colors). Anyway, fvwm let you choose the table you want.

> Maybe a 'EnableGradients on/off' might be
> something you'd consider.
>
> In any regard, I tried starting fvwm with '-color-limit 61' and that fixed
> my icon problems :-).

That is your EnableGradients on/off. But it does not disable gradient,
this is not the point. The point is dithering which is a technique which
allows to multiply colors. It needs special colors tables for fast
rendering. What we should do is to add some grey colors to these
tables and use it when we do not dither (default for icons).

> Is there anyway I can put that option inside of my
> .fvwm2rc file ?

No.

> Is there any reason why the "ColorLimit" command has been
> obsoleted ?
>

Yes. A bit technical to explain.

Regards, Olivier
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Oct 01 2002 - 16:55:23 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST