color-string 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -142,7 +142,7 @@ cs.get.hsl = function (string) {
142
142
 
143
143
  if (match) {
144
144
  var alpha = parseFloat(match[4]);
145
- var h = (parseFloat(match[1]) + 360) % 360;
145
+ var h = ((parseFloat(match[1]) % 360) + 360) % 360;
146
146
  var s = clamp(parseFloat(match[2]), 0, 100);
147
147
  var l = clamp(parseFloat(match[3]), 0, 100);
148
148
  var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "color-string",
3
3
  "description": "Parser and generator for CSS color strings",
4
- "version": "1.7.2",
4
+ "version": "1.7.3",
5
5
  "author": "Heather Arthur <fayearthur@gmail.com>",
6
6
  "contributors": [
7
7
  "Maxime Thirouin",