* ESLint rule: const naming Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> * Refactor according to review Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> * refactor: Reverts changes on `twenty-server` Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> Co-authored-by: v1b3m <vibenjamin6@gmail.com> --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>
9 lines
239 B
TypeScript
9 lines
239 B
TypeScript
/* eslint-disable @nx/workspace-no-hardcoded-colors */
|
|
import hexRgb from 'hex-rgb';
|
|
|
|
export const RGBA = (hex: string, alpha: number) => {
|
|
return `rgba(${hexRgb(hex, { format: 'array' })
|
|
.slice(0, -1)
|
|
.join(',')},${alpha})`;
|
|
};
|