Permalink
Browse files

CSS HSL requires 3 values, one 0-360 and the other two percentages.

  • Loading branch information...
1 parent 76fb14c commit 35a7f566c985215980c8beaa45af6652a89d493c Cristy committed Aug 17, 2015
Showing with 6 additions and 2 deletions.
  1. +6 −2 magick/color.c
View
@@ -1199,8 +1199,12 @@ MagickExport void ConcatenateColorComponent(const MagickPixelPacket *pixel,
(pixel->colorspace == HSVColorspace) ||
(pixel->colorspace == HWBColorspace))
{
- (void) FormatLocaleString(component,MaxTextExtent,"%.*g%%",
- GetMagickPrecision(),(100.0*QuantumScale*color));
+ if (channel == RedChannel)
+ (void) FormatLocaleString(component,MaxTextExtent,"%.*g",
+ GetMagickPrecision(),(360.0*QuantumScale*color));
+ else
+ (void) FormatLocaleString(component,MaxTextExtent,"%.*g%%",
+ GetMagickPrecision(),(100.0*QuantumScale*color));
(void) ConcatenateMagickString(tuple,component,MaxTextExtent);
return;
}

0 comments on commit 35a7f56

Please sign in to comment.