2019-10-07 17:11:53 -06:00
|
|
|
import { shade } from '../../utils/color';
|
2017-06-13 18:40:05 -06:00
|
|
|
|
2019-10-07 17:11:53 -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]);
|
|
|
|
});
|