@symbo.ls/scratch
Advanced tools
Comparing version 0.3.6 to 0.3.7
@@ -5,3 +5,3 @@ { | ||
"author": "Symbols", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "src" |
@@ -73,11 +73,7 @@ 'use strict' | ||
} else { | ||
console.log(rgb) | ||
const [r, g, b] = [...rgb.split(', ').map(v => parseFloat(v))] | ||
const hsl = rgbToHSL(r, g, b) | ||
const [h, s, l] = hsl | ||
console.log(h, s, l, tone) | ||
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255) | ||
console.log(newRgb) | ||
rgb = newRgb | ||
console.log(rgb) | ||
} | ||
@@ -222,5 +218,3 @@ val[tone] = { rgb, var: `${val.var}-${tone}` } | ||
const setSameValue = (val, key) => { | ||
return val | ||
} | ||
const setSameValue = (val, key) => val | ||
@@ -227,0 +221,0 @@ export const SETTERS = { |
@@ -162,3 +162,2 @@ 'use strict' | ||
export const rgbToHSL = (r, g, b) => { | ||
console.log(r, g, b) | ||
const a = Math.max(r, g, b); const n = a - Math.min(r, g, b); const f = (1 - Math.abs(a + a - n - 1)) | ||
@@ -332,2 +331,3 @@ const h = n && ((a == r) ? (g - b) / n : ((a == g) ? 2 + (b - r) / n : 4 + (r - g) / n)) | ||
if (val === '-' || val === '') return ({ }) | ||
if (val === 'auto') return ({ [prop]: val }) | ||
@@ -334,0 +334,0 @@ |
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
26670
830