(color: HexColor, alpha: number)
| 294 | } |
| 295 | |
| 296 | export function withAlpha(color: HexColor, alpha: number): string { |
| 297 | const { r, g, b } = hexToRgb(color) |
| 298 | return `rgba(${Math.round(r * 255)}, ${Math.round(g * 255)}, ${Math.round(b * 255)}, ${alpha})` |
| 299 | } |
no test coverage detected