Palette.Filter


interface Palette.Filter


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

Summary

Public functions

Boolean

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

Public functions

isAllowed

Added in 1.0.0
fun isAllowed(rgb: @ColorInt Int, hsl: FloatArray): Boolean

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

Parameters
rgb: @ColorInt Int

the color in RGB888.

hsl: FloatArray

HSL representation of the color.

Returns
Boolean

true if the color is allowed, false if not.

See also
addFilter