Page 1 of 1

Error in colors.xml?

Posted: 2008-07-15T09:51:33-07:00
by el_supremo
In IM 6.4.1 Q8 there are two definitions of "green" in colors.xml. The first, which is what MagickWand seems to use, is rgb(0,128,0) and the second is rgb(0,255,0).
Each of the other colours, red, blue, magenta, yellow, cyan, black and white is defined only once at the beginning of the file and they are all defined as "full scale" - e.g.red is rgb(255,0,0).

Is this an error?

Pete

Re: Error in colors.xml?

Posted: 2008-07-15T10:49:06-07:00
by magick
There are two versions of green because they follow two different standards: X11 and SVG. Which one is used is determines by the standards compliance passed to the query color method.

Re: Error in colors.xml?

Posted: 2008-07-15T14:49:42-07:00
by el_supremo
As far as I can see from the source, there's no way to specify compliance in MagickCore or MagickWand.
In MagickWand, when setting a colour name with PixelSetColor(p_wand,"green"), it calls QueryMagickColor which, in the case of a named colour, calls GetColorInfo. GetColorInfo searches the color_list (loaded from colors.xml?) and returns the first match to the name without regard to compliance. So, in the case of MagickWand code there seems to be no compliance at all. I can't find a MagickCore function which returns colour intensities given a colour name and compliance.

This is just FYI. It's not a panic for me, I'm just messing around.

Pete

Re: Error in colors.xml?

Posted: 2008-07-16T00:38:51-07:00
by anthony
Simple soluion "green" is SVG green "lime" is X11 green

I use lime for green in IM Examples all the time!