jordond / kmpalette

🎨 A Compose multiplatform port for Androidx Palette. Generate a color palette from an image.

Home Page:https://demo.kmpalette.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alpha must be between 0 and 255

DatL4g opened this issue · comments

This is hard to reproduce and I only faced this error myself once as well as only once by another user.
So I have no idea by what this is caused.

Could we change https://github.com/jordond/kmpalette/blob/main/androidx-palette/src/commonMain/kotlin/com/kmpalette/palette/internal/utils/ColorUtils.kt#L78 to use min and max to force the alpha to be between 0 and 255 instead of throwing an exception?