Expand description
Material 3 theme values for a host toolkit.
The caller owns the theme and supplies current window metrics and system preferences.
Structs§
- Argb
- A packed 8-bit sRGB color in alpha, red, green, blue order.
- Color
Pair - Resolved foreground and background colors for a Material pairing.
- Color
Scheme - All semantic color roles for one appearance, with per-role overrides.
- Cubic
Bezier - The two control points of a cubic Bézier easing from
(0, 0)to(1, 1). - Custom
Color Group - Resolved Material 3 four-role custom color group for one appearance.
- Font
Families - Family preference and ordered fallback for one typeface.
- Layout
Policy - Pure layout inputs. Widths and geometry are already in logical units.
- Material
Theme - Application-owned configuration consumed by the Material rendering layer.
- Spring
- Material spring parameters for unit mass.
- Type
Style - Material type metrics in scale-independent units (sp).
- Typography
- Family names for the Material scale. The host resolves available fonts and measures the resulting text.
Enums§
- Appearance
- The selected appearance. The host resolves any system preference.
- Color
Role - Semantic Material color roles.
- Corner
Role - Semantic Material 3 corner-radius scale tokens.
- Corner
Shape - Logical rounded corners in top-start, top-end, bottom-end, bottom-start order.
- Density
- Desktop density adjustment for a component’s visual size.
- Direction
- Logical horizontal reading and layout direction.
- Dynamic
Variant - The Material dynamic color palette to derive from a seed.
- Elevation
- The six Material elevation levels. The renderer supplies the shadow.
- Material
Shape - Named Material 3 Expressive shapes matching pinned Compose
MaterialShapes. - Motion
Kind - Spatial springs move or reshape an element. Effects springs drive properties such as color and opacity and use critical damping.
- Motion
Scheme - Standard and Expressive schemes from the fixed Material 3 reference.
- Motion
Spec - Resolved animation timing specification for a state transition.
- Motion
Speed - Relative speed tier for a Material motion token.
- Polygon
Role - Basic semantic polygon tokens bundled in
tokens/material.json. - Polygon
Spec - Inputs for the finite rounded polygons used as morph endpoints. These are source coordinates before path generation and normalization.
- Spec
Version - The requested Material Color Utilities specification.
- State
Layer - Material state layer opacities.
- Theme
Preset - Bundled palette recipes, with seed colors inspired by md3.io.
- Token
Value - The typed value of a token from the bundled data. Semantic color roles resolve through the current ColorScheme.
- Type
Role - One of the fifteen Material text roles.
- Typeface
- The two Material typeface families.
- Typography
Emphasis - Emphasis tier for Material 3 Expressive typography.
- Width
Class - Material window width classes, based on available logical width.
Functions§
- contrast_
ratio_ of_ tones - Returns the contrast ratio for two CIE L* tones, clamped to 0 through 100.
Returns
Noneif either tone is NaN. - harmonize_
color - Shifts
design’s hue towardsourceusing Material Color Utilities harmonization. Input alpha channels are ignored and the returned color is opaque. - token
- Looks up an exact, case-sensitive token name from the bundled Material data.