Use colors with an alpha value
I can't seem to use any colors with transparency, how would I go about doing this?
Thanks!
Hmm, interesting. Technically you can use color integers for Konfetti but the system is currently manipulating the alpha level in Particle.kt here.
I assume you have different colors of which some have different alpha values. This is an interesting use case that I didn't think of when making this.
I can either:
- Apply a fix so that the alpha value is not set when you turn this off with a setting when creating the particle system
- The alpha value is manipulated based on the alpha value of the color
The latter works for most use cases but requires some work. Let me know if you have any ideas
I was thinking maybe you could leave the alpha value of the color and instead of changing the alpha on each particle, could you manipulate the alpha value of the KonfettiView for the fadeOut?
Unfortunately the fade out has to happen for each particle individually since they each have a different lifespan and moment to disappear.
Ah okay. Then yeah, the second option would probably work (using the alpha value of the color).