lib-colors
Version:
Simple node.js library for work with colors
13 lines (10 loc) • 328 B
text/typescript
import { rgb } from '..';
import { testCases } from './cases/gray_rgb.case';
describe('test gray from rgb', () => {
testCases.forEach(({ gray, r, g, b }) => {
const result = rgb(r, g, b).gray().g;
it(`${JSON.stringify({ r, g, b })} -> ${gray} = ${result}`, () => {
expect(result).toBe(gray);
});
});
});