IM 6.0.8.68
I start with blue, but end up with red whether or not I use -colorspace sRGB
# convert blue to hsv
convert xc:blue -colorspace hsv txt:
# ImageMagick pixel enumeration: 1,1,65535,hsv
0,0: (43690,65535,65535) #AAAAFFFFFFFF hsv(240,100%,100%) <-- hue=240 is properly blue
# list hsv(240,100%,100%) in txt should return blue
convert xc:"hsv(240,100%,100%)" txt:
# ImageMagick pixel enumeration: 1,1,65535,hsv
0,0: (65535,65535,65535) #FFFFFFFFFFFF hsv(360,100%,100%) <-- red
# make a swatch from (blue) hsv(240,100%,100%) comes out red (adding -colorspace sRGB does not change the result)
Code: Select all
convert xc:"hsv(240,100%,100%)" swatch.png
IM 7.0.8.68 behaves differently
magick xc:blue -colorspace hsv txt:
# ImageMagick pixel enumeration: 1,1,65535,hsv
0,0: (43690,65535,65535) #AAAAFFFFFFFF hsv(240,100%,100%) <-- properly blue
magick xc:"hsv(240,100%,100%)" txt:
# ImageMagick pixel enumeration: 1,1,65535,hsv
0,0: (157284,65535,65535) #FFFFFFFFFFFF hsv(864,100%,100%) <-- hue=864 is outside the range 0 to 360
# swatch comes out green
Code: Select all
magick xc:"hsv(240,100%,100%)" swatch.png
Note: I tested versions back to 6.9.9.10 and got the same bad behavior.