okrad / svelte-progressbar

A multiseries, SVG progressbar component made with Svelte
https://okrad.github.io/svelte-progressbar/
MIT License
129 stars 18 forks source link

Colors with opacity are not working #42

Open sorasful opened 3 weeks ago

sorasful commented 3 weeks ago

Hi there !

I noticed a behavior that is not supported actually, and I think this could be a great addition to this library. It's the opacity, for now it's not supported, at least in the thresholds :


<ProgressBar
                            series={[$matchPercentage]} height="{20}" color="#5AB6DF" style={"default"} textSize={130}
                            thresholds={[
                            { till: 30, color: '#FF4D4D66' },
                            { till: 60, color: '#FFBD4466' },
                            { till: 85, color: '#76E63566' },
                            { till: 100, color: '#53D50566' },
                        ]}
                    />

And here is the error :

image

Thanks !