Skip to content

DrawableToColorMapper

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

fun interface DrawableToColorMapper

A utility interface to convert a Drawable to a meaningful color. This interface is meant for internal usage, please use it carefully.

Inheritors

LegacyDrawableToColorMapper

Types

DrawableToColorMapper.Companion

Functions

mapDrawableToColor

abstract fun mapDrawableToColor(drawable: Drawable, internalLogger: InternalLogger): Int?

Maps the drawable to its meaningful color, or null if the drawable is mostly invisible.

Return

the color as an Int (in 0xAARRGGBB order), or null if the drawable is mostly invisible

Parameters
drawable the drawable to convert
internalLogger the internalLogger to report warnings
Clone this wiki locally