Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!jim From: jim@EXPO.LCS.MIT.EDU (Jim Fulton) Newsgroups: comp.windows.x Subject: Re: Determining color/black-white Message-ID: <8906231943.AA10184@expo.lcs.mit.edu> Date: 23 Jun 89 19:43:11 GMT References: <8906231926.AA12265@apple-gunkies.ai.mit.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 22 What is the best method of determining if a screen supports color or not? Walk down the visuals of the screen using XGetVisualInfo. There is an example of how this routine is called in the client xdpyinfo. Or, you could use XMatchVisualInfo to do the searching. See Rosenthal and Lemke's paper "Visualizing X11 Clients" available through anonymous ftp from expo.lcs.mit.edu as /contrib/Visuals.shar. DisplayCells doesn't work, It tells you how many cells are in the colormap of the default visual. If the default visual is single-plane StaticGray or GrayScale, then you'll miss out if there are other visuals available. checking number of planes seems to be a reasonable test. Depends on whether or not you consider multiple shades of gray to be "colors" (i.e. think of displays with StaticGray or GrayScale visuals).