1 import type { CSSProperties } from 'react';
3 import tinycolor from 'tinycolor2';
5 import { genAccentShades } from '@proton/colors';
6 import { COLORS } from '@proton/shared/lib/calendar/constants';
8 export const getEventStyle = (backgroundColor = '', style: CSSProperties = {}) => {
9 const [base, alt] = genAccentShades(tinycolor(backgroundColor)).map((c) => c.toHexString());
10 const alpha = tinycolor(backgroundColor)?.setAlpha(0.3);
16 '--color-alpha': alpha,
17 '--foreground': COLORS.WHITE,