make Chroma
@ApiStatus.Experimental
Make the given color chroma, meaning it will change its hue over time.
If you wish to change the speed of the color, you can change the value of the LongRef returned by toChromaSpeed:
// apply the chroma to the color of this Drawable
val speed = 5.seconds.toChromaSpeed()
this.color.applyChroma(speed)
// now you can mutate the speed at any point you like
speed.element = 10.secondsContent copied to clipboard
Return
the DrawableOp that was applied to this drawable, so you can remove it later to stop the chroma.
Since
1.0.5
Parameters
speed Nanos
the speed of the chroma, in nanoseconds. The default is 5 seconds. use the toChromaSpeed extension function to convert from other units.