Filter

interface Filter
androidx.palette.graphics.Palette.Filter

A Filter provides a mechanism for exercising fine-grained control over which colors are valid within a resulting Palette.

Summary

Public methods
abstract Boolean
isAllowed(rgb: Int, hsl: FloatArray)

Hook to allow clients to be able filter colors from resulting palette.

Public methods

isAllowed

abstract fun isAllowed(rgb: Int, hsl: FloatArray): Boolean

Hook to allow clients to be able filter colors from resulting palette.

Parameters
rgb Int: the color in RGB888.
hsl Int: HSL representation of the color.
Return
Boolean: true if the color is allowed, false if not.