cabana/src/__tests__/utils/color.test.js

9 lines
218 B
JavaScript
Raw Normal View History

import { shade } from '../../utils/color';
2017-06-13 18:40:05 -06:00
test('Shade darkens rgb white (255,255,255)', () => {
2017-12-12 19:27:20 -07:00
const rgb = [255, 255, 255];
const darkenRgb = shade(rgb, -0.5);
2017-06-13 18:40:05 -06:00
2017-12-12 19:27:20 -07:00
expect(darkenRgb).toEqual([128, 128, 128]);
});