Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!cs.utexas.edu!uunet!sdrc!evmaster From: evmaster@sdrc.UUCP (System Interface Library) Newsgroups: comp.windows.x Subject: Quick way to get pixel from name Keywords: colormap X Message-ID: <723@sdrc.UUCP> Date: 10 May 89 21:50:32 GMT Organization: Structural Dynamics Research Corp., Cincinnati Lines: 10 I need a quick way to get the pixel number of a named color. Essentially, I need a version of XLookupColor that will fill in the pixel field of the XColor structure upon return and use some value like -1 if the named color isn't in the specified color map. Is there a quick way to do this or will I have to traverse the colormap by hand (slow) ? I'm wanting to set the XtNbackground field of an HP Widget. I know the name of the color I want but I need the pixel value. Thanks in advance.