Permalink
Browse files
CSS HSL requires 3 values, one 0-360 and the other two percentages.
- Loading branch information...
Showing
with
6 additions
and
2 deletions.
-
+6
−2
magick/color.c
|
|
@@ -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