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(@ColorInt rgb: Int, @NonNull hsl: FloatArray) Hook to allow clients to be able filter colors from resulting palette. |
Public methods
isAllowed
abstract fun isAllowed(
@ColorInt rgb: Int,
@NonNull hsl: FloatArray
): Boolean
Hook to allow clients to be able filter colors from resulting palette.
Parameters | |
---|---|
rgb |
Int: the color in RGB888. |
hsl |
FloatArray: HSL representation of the color. |
Return | |
---|---|
Boolean |
true if the color is allowed, false if not. |
See Also