SuSE Support Database

Title: X server: configuring color depth

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

X server: configuring color depth

Applies to

SuSE Linux: Versions since 4.2

Request:

Either your X server starts always in 8 bit color depth or you come across the problems described in http://www.suse.de/Support/sdb/colormap.html. However, you would like to be able to use more than 256 colors under XFree86.

Background:

A precondition is that your graphics adapter and the X server support a color depth of more than 8 bit.

The color depth specifies, how many bits are used to store a pixels color value. Also the number of the colors available at the same time is limited by this.

The number of usable colors (at the same time) has nothing to do with a graphic cards ability to display colors. A selection of n colors (e.g. 256 with 8 bit color depth) from all the colors that the graphic card can produce is used.

On most of the X servers the following (or some of the following) color depths are available:

24 bit color depth is supported only by very few X servers.

How do I find out the current color depth?

The program xdpyinfo gives very detailed information about the status of the current X display It probably was installed on your system together with the XFree package. The best way to call it is
xdpyinfo | more
e.g. in an xterm.

It produces a lot of output. The following is an excerpt of such an output :

name of display:   Heron.suse.de:0.0
version number:    11.0
vendor string:    The XFree86 Project, Inc
vendor release number:    3200
maximum request size:  4194300 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst

[...]

default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x1024 pixels (433x347 millimeters)
  resolution:    75x75 dots per inch
  depths (2):    1, 8
  root window id:    0x2a
  depth of root window:    8 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x26
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 1

[...]
The section "screen #0" is interesting for the determination of the color depth.

There the current resolution (dimensions: 1280x1024 pixels (433x347 millimeters)), the color depth (depth of root window: 8 planes; here 8 bits) and the number of the possible colors (default number of colormap cells: 256; here 256 colors) is shown.

Procedure:

The following items are discussed below:

Important:

The color depth can only be configured during start-up of the X server. A change at runtime is impossible.

Therefore, one must always exit the X server and then restart it with startx or via xdm. There are several ways to configure the color depth.

---

See also:

---

Keywords: XDM, STARTX, X-SERVER, COLORS, COLOURS, COLORMAP, COLOR DEPTH, BPP, BITPLANE, DEPTH

---

Categories: X Server , X Window System

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-maddin_bpp, Copyright SuSE GmbH, Nuremberg, Germany - Version: 25. Feb 1997
Impressum - Last generated: 24. Feb 1999 15:03:15 by maddin with sdb_gen 1.00.0