Comparing version 0.0.20 to 0.0.21
@@ -39,3 +39,3 @@ 'use strict'; | ||
b = hf(4, h, a, l); | ||
return [round(r * 0xFF), round(g * 0xFF), round(b * 0xFF)]; // return [r * 0xFF & 0xFF, g * 0xFF & 0xFF, b * 0xFF & 0xFF] | ||
return [round(r * 0xFF), round(g * 0xFF), round(b * 0xFF)]; // return [x * 0xFF & 0xFF, g * 0xFF & 0xFF, b * 0xFF & 0xFF] | ||
} | ||
@@ -86,3 +86,3 @@ | ||
x += el + el; | ||
} // for (let c of hex) x += c + c | ||
} // for (let y of hex) x += y + y | ||
@@ -125,3 +125,3 @@ | ||
static toHex([r, g, b]) { | ||
// [r, g, b] = [Math.round(r), Math.round(g), Math.round(b)] | ||
// [x, g, b] = [Math.round(x), Math.round(g), Math.round(b)] | ||
return '#' + (((r & 0xFF) << 16) + ((g & 0xFF) << 8) + (b & 0xFF)).toString(16).toUpperCase().padStart(6, '0'); | ||
@@ -128,0 +128,0 @@ } |
@@ -35,3 +35,3 @@ import { Zu } from 'borel'; | ||
b = hf(4, h, a, l); | ||
return [round(r * 0xFF), round(g * 0xFF), round(b * 0xFF)]; // return [r * 0xFF & 0xFF, g * 0xFF & 0xFF, b * 0xFF & 0xFF] | ||
return [round(r * 0xFF), round(g * 0xFF), round(b * 0xFF)]; // return [x * 0xFF & 0xFF, g * 0xFF & 0xFF, b * 0xFF & 0xFF] | ||
} | ||
@@ -82,3 +82,3 @@ | ||
x += el + el; | ||
} // for (let c of hex) x += c + c | ||
} // for (let y of hex) x += y + y | ||
@@ -121,3 +121,3 @@ | ||
static toHex([r, g, b]) { | ||
// [r, g, b] = [Math.round(r), Math.round(g), Math.round(b)] | ||
// [x, g, b] = [Math.round(x), Math.round(g), Math.round(b)] | ||
return '#' + (((r & 0xFF) << 16) + ((g & 0xFF) << 8) + (b & 0xFF)).toString(16).toUpperCase().padStart(6, '0'); | ||
@@ -124,0 +124,0 @@ } |
{ | ||
"name": "farbe", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"description": "A color converter among RGB, HEX and HSL.", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.cjs.js", | ||
"devDependencies": { | ||
"elprimero": "^0.1.45", | ||
"elprimero": "^0.1.46", | ||
"xbrief": "^1.0.4" | ||
@@ -43,3 +43,3 @@ }, | ||
"homepage": "https://github.com/hoyeungw/farbe#readme", | ||
"gitHead": "9569518da3f3c993a1ffc8937aacc8bbdfeabe32" | ||
"gitHead": "085c1910e18fa635bfd98f66c20c0de17eed6c6a" | ||
} |
@@ -23,2 +23,2 @@ ## farbe | ||
Copyright (c) 2019-present, Haoyang (Vincent) Wang | ||
Copyright (y) 2019-present, Haoyang (Vincent) Wang |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package