Package-level declarations
Types
Define the threshold for a contrast ratio.
The pixels samplePixels kept, plus the width and height of the sampled grid.
Properties
Legacy Android control accent, retained for existing MaterialKolor themes and exports.
Legacy Android control highlight, translucent white in dark mode and black in light mode.
Legacy Android secondary control color, mapped to on-surface-variant from the 2025 spec.
The pixel budget the image helpers quantize by default. Upstream Material Color Utilities recommends resizing to 128 by 128 before quantizing.
The spring every MaterialKolor color animation falls back to when the caller passes no spec.
Get the Color used to generate the DynamicScheme.
Legacy Android inverse hint text.
Legacy Android inverse primary text, mapped to inverse-on-surface from the 2025 spec.
Legacy Android inverse primary text for controls with a separate disabled state.
Legacy Android inverse secondary and tertiary text.
Legacy Android disabled inverse secondary and tertiary text.
Functions
Contrast ratio is a measure of legibility, its used to compare the lightness of two colors. This method is used commonly in industry due to its use by WCAG.
Create a DynamicScheme based on the provided colors.
If color is disliked, lighten it to make it likable.
Blend the color's HCT hue towards the other color's HCT hue, in a way that leaves the original color recognizable and recognizably shifted towards the key color.
Blend the design color's HCT hue towards the key color's HCT hue, in a way that leaves the original color recognizable and recognizably shifted towards the key color.
Check if the contrast ratio between two colors is greater than or equal to a given threshold.
Returns true if color is disliked.
Quantize the colors in a ImageBitmap to a maximum of maxColors colors.
Create and remember a DynamicScheme based on the provided colors.
Determine the most suitable color in a ImageBitmap for a UI theme.
Determine the most suitable color in a ImageBitmap for a UI theme.
Create and remember a TonalPalette for a seed color the scheme does not cover.
Nearest-neighbour samples this bitmap down to at most sampleArea pixels.
Value representing cool-warm factor of a color.
Design utilities using color temperature theory.
Determine the most suitable color in a ImageBitmap for a UI theme.
Determine the most suitable color in a ImageBitmap for a UI theme or null
Rank the colors in a ImageBitmap by their suitability for being used for a UI theme.
Generate a DynamicScheme based on the given Color.
Contrast ratio of two tones. T in HCT, L* in Lab*. Also known as luminance or perpetual luminance.