Interface ColorToAlphaOptions

Options of Image.colorToAlpha

interface ColorToAlphaOptions {
    opacityThreshold?: number;
    transparencyThreshold?: number;
}

Properties

opacityThreshold?: number

Pixels at least this far from the color (0-1) stay fully opaque. Default: 1

transparencyThreshold?: number

Pixels at most this far from the color (0-1) become fully transparent. Default: 0