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
Error in colors.xml?
Re: Error in colors.xml?
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.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Error in colors.xml?
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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Error in colors.xml?
Simple soluion "green" is SVG green "lime" is X11 green
I use lime for green in IM Examples all the time!
I use lime for green in IM Examples all the time!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/