UNPKG

@mozaic-ds/chart

Version:

<p align="center"> <img alt="ADEO Design system - Chart library" src="./.storybook/assets/adeo-design-system-chart-banner.svg" /> </p>

5 lines (4 loc) 192 B
export function addAlpha(color: string, opacity: number) { const _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255); return color + _opacity.toString(16).toUpperCase(); }