@palett/toner-hsl
Advanced tools
Comparing version 0.7.9 to 0.7.10
@@ -8,5 +8,5 @@ 'use strict'; | ||
const toner = (hsl, dh, ds, dl) => { | ||
hsl[0] = math.constraint(hsl[0] + dh, 0, 360); | ||
hsl[1] = math.constraint(hsl[1] + ds, 0, 100); | ||
hsl[2] = math.constraint(hsl[2] + dl, 0, 100); | ||
if (dh) hsl[0] = math.constraint(hsl[0] + dh, 0, 360); | ||
if (ds) hsl[1] = math.constraint(hsl[1] + ds, 0, 100); | ||
if (dl) hsl[2] = math.constraint(hsl[2] + dl, 0, 100); | ||
return hsl; | ||
@@ -13,0 +13,0 @@ }; |
import { constraint } from '@aryth/math'; | ||
const toner = (hsl, dh, ds, dl) => { | ||
hsl[0] = constraint(hsl[0] + dh, 0, 360); | ||
hsl[1] = constraint(hsl[1] + ds, 0, 100); | ||
hsl[2] = constraint(hsl[2] + dl, 0, 100); | ||
if (dh) hsl[0] = constraint(hsl[0] + dh, 0, 360); | ||
if (ds) hsl[1] = constraint(hsl[1] + ds, 0, 100); | ||
if (dl) hsl[2] = constraint(hsl[2] + dl, 0, 100); | ||
return hsl; | ||
@@ -8,0 +8,0 @@ }; |
{ | ||
"name": "@palett/toner-hsl", | ||
"version": "0.7.9", | ||
"version": "0.7.10", | ||
"description": "A color converter among RGB, HEX and HSL.", | ||
@@ -43,3 +43,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/palett/rgb#readme", | ||
"gitHead": "122d02cbfff85a82d703afb1ee1a30b38789cd02" | ||
"gitHead": "ddfad2a10d138a1f32f77faa7916bbc60c7e89cc" | ||
} |
3394