UNPKG
color2color
Version:
latest (0.2.0)
0.2.0
0.1.0
change one color format to another.
github.com/katsew/color2color
katsew/color2color
color2color
/
test
/
rgb2hsv.spec.js
13 lines
(8 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict'
;
const
rgb2hsv =
require
(
'..'
).
rgb2hsv
;
const
expect =
require
(
'chai'
).
expect
;
describe
(
'Convert RGB to HSV (HSB)'
,
() =>
{
it
(
'input r, g, b return [h, s, b]'
,
() =>
{
expect
(
rgb2hsv
(
80
,
100
,
60
)).
to
.
deep
.
equal
([
90
,
0.1
,
0.3
]); }); });