@palett/convert
Advanced tools
Comparing version 0.2.11 to 0.2.12
@@ -5,3 +5,3 @@ 'use strict'; | ||
var aryth = require('aryth'); | ||
var math = require('@aryth/math'); | ||
@@ -72,3 +72,3 @@ const rgbToInt = ([r, g, b]) => ((r & 0xFF) << 16) + ((g & 0xFF) << 8) + (b & 0xFF); | ||
l = sum / 2; | ||
return [aryth.round(h), aryth.round(s * THOUSAND) / 10, aryth.round(l * THOUSAND) / 10]; | ||
return [math.round(h), math.round(s * THOUSAND) / 10, math.round(l * THOUSAND) / 10]; | ||
} | ||
@@ -146,3 +146,3 @@ | ||
b = hf(4, h, a, l); | ||
return [aryth.round(r * 0xFF), aryth.round(g * 0xFF), aryth.round(b * 0xFF)]; // return [r * 0xFF & 0xFF, g * 0xFF & 0xFF, b * 0xFF & 0xFF] | ||
return [math.round(r * 0xFF), math.round(g * 0xFF), math.round(b * 0xFF)]; // return [r * 0xFF & 0xFF, g * 0xFF & 0xFF, b * 0xFF & 0xFF] | ||
} | ||
@@ -149,0 +149,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { round } from 'aryth'; | ||
import { round } from '@aryth/math'; | ||
@@ -3,0 +3,0 @@ const rgbToInt = ([r, g, b]) => ((r & 0xFF) << 16) + ((g & 0xFF) << 8) + (b & 0xFF); |
{ | ||
"name": "@palett/convert", | ||
"version": "0.2.11", | ||
"version": "0.2.12", | ||
"description": "A color converter among RGB, HEX and HSL.", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"aryth": "^0.0.5" | ||
"@aryth/math": "^0.2.5" | ||
}, | ||
@@ -44,3 +44,3 @@ "repository": { | ||
"homepage": "https://github.com/hoyeungw/palett/rgb#readme", | ||
"gitHead": "bc5829f824fe916225e028f985a3a7ed9d364ff2" | ||
"gitHead": "40671704dd995d641148d4ce9e9ae2de0f93e013" | ||
} |
8657
+ Added@aryth/math@^0.2.5
+ Added@aryth/math@0.2.14(transitive)
- Removedaryth@^0.0.5
- Removedaryth@0.0.5(transitive)
- Removedtypen@0.1.11(transitive)