Package-level declarations

Types

Link copied to clipboard
interface ColorSpec

An interface defining all the necessary methods that could be different between specs.

Link copied to clipboard

ColorSpec implementation for the 2021 spec.

Link copied to clipboard

ColorSpec implementation for the 2025 spec.

Link copied to clipboard
class ContrastCurve(low: Double, normal: Double, medium: Double, high: Double)

A class containing a value that changes with the contrast level.

Link copied to clipboard
class DynamicColor(val name: String, val palette: (DynamicScheme) -> TonalPalette, val tone: (DynamicScheme) -> Double, val isBackground: Boolean, val chromaMultiplier: (DynamicScheme) -> Double?? = null, val background: (DynamicScheme) -> DynamicColor?? = null, val secondBackground: (DynamicScheme) -> DynamicColor?? = null, val contrastCurve: (DynamicScheme) -> ContrastCurve?? = null, val toneDeltaPair: (DynamicScheme) -> ToneDeltaPair?? = null, val opacity: (DynamicScheme) -> Double?? = null)

A color that adjusts itself based on UI state, represented by DynamicScheme.

Link copied to clipboard

Named colors, otherwise known as tokens, or roles, in the Material Design system.

Link copied to clipboard
class ToneDeltaPair(val roleA: DynamicColor, val roleB: DynamicColor, val delta: Double, val polarity: TonePolarity, val stayTogether: Boolean = true, val deltaConstraint: ToneDeltaPair.DeltaConstraint = DeltaConstraint.EXACT)

Documents a constraint between two DynamicColors, in which their tones must have a certain distance from each other.

Link copied to clipboard

Describes the relationship in lightness between two colors.