How to determine current X-Window color depth

Your Problem

You want to know, under which color depth your X-Server is currently running. This means you want to know wether you have 256, 65536 or 12 Mio different colors available (i.e. 2^8, 2^16 or 2^24).

The difference between 2^8 and 2^16 colors is big, but between 2^16 and 2^24 colors it is almost not visible at all. It is important if you work with images, however!

The Solution

Simply use the tool xquery with the option -c: It will show your color depth:

> xquery -c
0 16

This screen has only 2^16 colors, i.e. 65536! If your display is working at 2^24 colors - which one should expect in our days - the output should show this:

> xquery -c
0 24

Keywords: color colour colors colours depth colordepth colourdepth x x11 xquery   Author: Mathias Kettner

Tauschzone MK