UNPKG

color2color

Version:

change one color format to another.

13 lines (8 loc) 262 B
'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]); }); });