1 import type { Instance as Color } from 'tinycolor2';
2 import tiny from 'tinycolor2';
4 import percentOf from '@proton/utils/percentOf';
6 function shade(color: Color, percent: number) {
7 const rgb = color.toRgb();
9 rgb.r = percentOf(100 - percent, rgb.r);
10 rgb.g = percentOf(100 - percent, rgb.g);
11 rgb.b = percentOf(100 - percent, rgb.b);