Page 1 of 1

hsl not working as expected

Posted: 2009-04-26T12:16:58-07:00
by daviddoria
I am trying to make a block a certain hsl color. This works with rgb (creates a red image 200x100):

Code: Select all

convert -size 200x100 xc:rgb\(255,0,0\) rgb.png
I thought this would do exactly the same thing:

Code: Select all

convert -size 200x100 xc:hsl\(0,100%,50%\) hsl.png
but it produces a black image. Why is that?

Thanks,

Dave

Re: hsl not working as expected

Posted: 2009-04-26T13:36:37-07:00
by magick
We get a red image as expected. We're using ImageMagick 6.5.1-7, the current release.

Re: hsl not working as expected

Posted: 2009-04-26T15:35:10-07:00
by fmw42
put any colors specified as rgb or hsl in quotes, e.g. xc:"hsl(0,100%,50%)"

see http://www.imagemagick.org/script/color.php

What IM version are you using? Perhaps it is too old.

Re: hsl not working as expected

Posted: 2009-04-26T15:51:34-07:00
by daviddoria
Same black result with the quotes:

Code: Select all

convert -size 200x100 xc:"hsl(100,100%, 50%)" square.png
I'm using
ImageMagick.i386 6.4.0.10-2.fc10

I'll try upgrading, but it seems odd that it would not give an error and just not work?

Dave

Re: hsl not working as expected

Posted: 2009-04-26T16:04:46-07:00
by fmw42
I get using IM 6.5.1-7 Q16 Mac OSX Tiger:

convert -size 200x100 xc:"hsl(100,100%, 50%)" green_box.png

Image

Re: hsl not working as expected

Posted: 2009-04-26T16:10:04-07:00
by daviddoria
Here's my result of the same green_box command:
Image

Re: hsl not working as expected

Posted: 2009-04-26T16:15:18-07:00
by fmw42
could have been a bug in your old version of IM. try upgrading.