Warning: darkred is not a known color?
I am generating DOT files from graph data pulled from a database. At runtime, the user can choose different colors from a drop-down list for different graph elements. For example, articulation nodes can be represented differently than normal nodes, or bridge edges can be shown in a special color.
Since I am developing the GUI application with Qt, I have a list containing the built-in global color names which Qt supports, such as "darkRed". Additionally, the user can choose a custom color from the entire RGB gamut which returns a coded RGB name like "#ffe0e0" for light red, for example. When I use the coded RGB value directly in the DOT file, it works as expected (it has to be quoted, though).
But GraphViz also supports some named colors. Unfortunately, there is no obvious 1-to-1 correlation except for the primary colors (red, green, blue) and complements. I saw that there is a source file called "color_names" in graphviz/lib/common with several hundred named colors, some of which appear to be quite exotic ("chocolate" or "midnightblue", for example). The color "darkred" appears there, but when I use this (e.g.) "fillcolor=darkred", the above warning appears.
How can I determine at runtime which named colors are supported by the user's GraphViz installation? (I realize there is also the "colorscheme" parameter, but the user might not have a particular colorscheme installed). I can play it safe by always using an RGB name, but it would be nice not to have to do that.