Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!BOSCO.BERKELEY.EDU!rusty From: rusty@BOSCO.BERKELEY.EDU Newsgroups: comp.windows.x Subject: color map question Message-ID: <8806091630.AA02763@velveeta> Date: 9 Jun 88 16:30:48 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: rusty@cartan.berkeley.edu Lines: 23 How does one go about printing out the "default" color map? I'm on a sun 3/60 (cgfour) running x11r2. My code looks something like dpy = XOpenDisplay(NULL)); scr = DefaultScreen(dpy); scrn = XScreenOfDisplay(dpy, scr); nplanes = XDefaultDepth(dpy, scr); ncells = XCellsOfScreen(scrn); XAllocColorCells(dpy, XDefaultColormap(dpy, scr), 0, plane_masks, nplanes, cmap_cells, ncells); for (i = 0; i < nplanes; i++) printf("plane_masks[%d] = 0x%x\n", i, plane_masks[i]); for (i = 0; i < ncells; i++) printf("cmap_cells[%d] = 0x%x\n", i, cmap_cells[i]); If I run my program after starting up the server all I get is 0's. The cgfour has a 256 cell color map and I just want to display a 16 by 16 grid with each color of the color map in a square. Is there a good book that explains the concepts, principals, etc. of color maps?