Package-level declarations
Types
Contains predefined Dp values for elevation levels.
Used to order tokens in the catalog, preview and tests.
A color scheme holds all the named color parameters for a SparkTheme highly inspired by Material 3 ColorScheme.
Holds the active font family for the SparkTheme, with optional token-highlighter override.
Components are grouped into shape categories based on their size. These categories provide a way to change multiple component values at once, by changing the category’s values. SparkShapes categories include:
Properties
Extension property to get a CornerBasedShape with a bottom start of 0.dp.
Extension property to get a TextStyle with SparkTypography.highlightWeight applied
Contrast level is an api available in the UiModeManager starting Android 34
Returns this Color with an alpha of zero. Use this when animating from transparent to a colour, because Color.Transparent is opaque black under the hood and produces a black flash.
Functions
Returns the new background Color to use, representing the original background backgroundColor with an overlay corresponding to elevation applied. The overlay will only be applied to ColorScheme.surface.
Converts a SparkColors instance to a Material 3 ColorScheme.
Converts a Material ColorScheme to a SparkColors instance.
The Material color system contains pairs of colors that are typically used for the background and content color inside a component. For example, a ButtonFilled typically uses main for its background, and onMain for the color of its content (usually text or iconography).
The Material color system contains pairs of colors that are typically used for the background and content color inside a component. For example, a ButtonFilled typically uses main for its background, and onMain for the color of its content (usually text or iconography).
Retrieve the contrast level of the device. This value can be used to adjust the colors of the theme.
A SparkColors implementation which sets all colors to debugColor to help highlighting the usage of SparkTheme.colors to more easily detect where they're not used.
Medium emphasis for text.
Medium emphasis for icons.
Medium emphasis.
To represent low elements.
Sets LocalContentColor at dim5 alpha. Do not use on Android; the Material Ripple handles press states already.
Sets LocalContentColor to SparkColors.onSurface at dim3 alpha (disabled emphasis, close to grey).
Sets LocalContentColor to SparkColors.onSurface, the full-emphasis colour. This is the default emphasis for the whole theme.
Sets LocalContentColor to SparkColors.onSurface at dim1 alpha (medium emphasis, close to dark grey).
Creates a Ripple using the provided values and values inferred from the theme.
Creates a SparkFontFamily with the given fontFamily and useSparkTokensHighlighter.
Computes the surface tonal color at different elevation levels e.g. surface1 through surface5.