Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!bbn!diamond.bbn.com!mlandau From: mlandau@bbn.com (Matt Landau) Newsgroups: comp.graphics Subject: References sought on finding "closest match" to a color Message-ID: <11076@jade.BBN.COM> Date: 22 May 88 21:43:18 GMT Reply-To: mlandau@bbn.com (Matt Landau) Organization: BBN Laboratories Incorporated, Cambridge, MA Lines: 20 I'm looking for references to techniques that do a resonable at finding the "closest" match to a desired color, given a pool of candidate colors from which to select. More specifically, given a target RGB value and an arbitrary sized colormap consisting of RGB triplets over which you have no control, how do you go about choosing the nearest available color? There are a couple of obvious techniques. For example, you could consider RGB as defining axes in 3-space and try to minimize the spatial distance between the color you want and the colors you have -- looking at the code, X11R2 seems to do this. I suspect there are better techniques available. Can someone out there save me some research time, or is it time to head back to the reference books? -- Matt Landau mlandau@bbn.com Diplomacy is the art of saying "nice doggy" until you can find a rock.