This class is both a simple RGB<->string converter, and a full xpm java image creator. If you have a file with a "creative" name like "DarkOrange2", you can use this to get some actual RGB values. Or, in the unlikely event you'd like a name for an RGB tripplet, if it knows one, it can give you one.
A large portion of this class is basically a wrapper around the old "rgb.txt" file distributed with X11. So if you know what that means, rejoice, and help yourself.
You can grab the source, or if you're in a hurry, just grab the class directly, and play with it. [v1.9, last updated July 17, 2001: It should work with all sizes of xpm now!]
Given a {red#, green#,blue#} int array, looks up a String representation of that triplet. Returns null if no match
Given a 'colorful' name, looks up an RGB triplet, and returns it as an int[3]. Returns null if no match.
Given a string with a single xpm image, will convert it to an (java.awt.Image) object. (or null if truncated string passed in)