Path: utzoo!attcan!uunet!ginosko!bbn!usc!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU (Donna Converse) Newsgroups: comp.windows.x Subject: Re: Is The Screen Color? Message-ID: <8906261440.AA13062@expo.lcs.mit.edu> Date: 26 Jun 89 14:40:32 GMT References: <18700@paris.ics.uci.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 25 > someone asked about how to determine if the screen was > color or black and white. I found this in a book I have by O'Reilly and > Associates. > depth = DisplayPlanes( display, screen ); Agh! We just answered this a hundred questions ago! :-) Would your application consider StaticGray and GrayScale visuals with multiple shades of gray (more than 2 cells) to be color? Is a GrayScale visual just as suitable as a PseudoColor visual for your application? If not, use XGetVisualInfo and walk down the list of visuals it returns to find the best visual type for your application. Testing if the display has more than 1 plane only tells you if the hardware of the display is capable of displaying more than just black and white. It does not tell you anything about the characteristics of the default visual of the display. Don't assume that the default visual of an n-plane display is capable of displaying colors of the rainbow. Donna Converse converse@expo.lcs.mit.edu