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