mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-03 11:21:38 +00:00
7 lines
190 B
TypeScript
7 lines
190 B
TypeScript
export const rgbToRgba = (rgb: string | undefined, alpha: number) => {
|
|
if (!rgb) {
|
|
return undefined;
|
|
}
|
|
|
|
return rgb.replace(')', `, ${alpha})`).replace('rgb', 'rgba');
|
|
};
|