Fixed: - CPColor hsbComponents range.

Previously, - CPColor hsbComponents returned degrees and percents. With the latest change to - CPColor colorWithHue:saturation:brightness: this was inconsistent.

Now - CPColor hsbComponents returns its components as factors in the 0-1.0 range.
This commit is contained in:
Alexander Ljungberg
2013-04-20 13:41:16 +01:00
parent 40579b5d56
commit 4e1a1415f6
+6 -3
View File
@@ -603,6 +603,9 @@ var cachedBlackColor,
/*!
Returns an array with the HSB values for this color.
The values are expressed as fractions between 0.0-1.0.
The index values are ordered as:
<pre>
<b>Index</b> <b>Component</b>
@@ -649,9 +652,9 @@ var cachedBlackColor,
}
return [
ROUND(hue * 360.0),
ROUND(saturation * 100.0),
ROUND(brightness * 100.0)
hue,
saturation,
brightness
];
}