I've been looking at the color tests (in src/libbu/tests) which don't fare well. In my limited research I see that going between an RGB and other systems don't round-trip very well, especially when we start with an integer RGB representation.
I have fiddled with several things to try to help the situation: + an int/float RGB conversion function that uses a forced precision and sprintf for string comparisons (max of three decimal places helps a LOT) + an rgb float <=> hsv function instead of the rgb integer <=> hsv version + modified the rgb <=> hsv based on other algorithms and actual results compared to a table of color values I found here: http://en.wikipedia.org/wiki/HSL_and_HSV It seems to me we need to decide on precisely what we want for standard color handling and then make the functions round trip if we need to do that. Comments welcome. Best regards, -Tom ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel