alphaClear

fun alphaClear(color: Color, threshold: Float): Image

Clears the alpha channel of the image based on a specified color and threshold. This operation sets the alpha channel to 0 for pixels that match the specified color within the threshold.

Return

A new Image object with the alpha channel cleared.

Parameters

color

The color to clear the alpha channel for.

threshold

The threshold for color matching (0.0 to 1.0).