UNPKG

lib-colors

Version:

Simple node.js library for work with colors

14 lines (11 loc) 395 B
import { rgb } from '..'; import { testCases } from './cases/cmyk_rgb.case'; describe('test cmyk from rgb', () => { testCases.forEach(({ c, m, y, k, r, g, b }) => { const result = rgb(r, g, b).cmyk().toString(); const expected = `${c} ${m} ${y} ${k}`; it(`${JSON.stringify({ r, g, b })} -> ${result} = ${expected}`, () => { expect(result).toBe(expected); }); }); });