SparkColors
A color scheme holds all the named color parameters for a SparkTheme highly inspired by Material 3 ColorScheme.
SparkColors are designed to be harmonious, ensure accessible text, and distinguish UI elements and surfaces from one another. There are two built-in baseline schemes, lightSparkColors and a darkSparkColors, that can be used as-is or customized.
To learn more about colors, see Material Design colors and Spark colors.
Constructors
Properties
The preferred tonal color of warning containers.
The background color that appears behind scrollable content.
The background color that appears behind scrollable content.
The preferred tonal color of error containers.
The preferred tonal color of info containers.
The preferred tonal color of containers.
Darker variation of main color.
The preferred tonal color of neutral containers.
Color used for text and icons displayed on top of the alertContainer color.
Color used for text and icons displayed on top of the background color.
Color used for text and icons displayed on top of the background color.
The color (and state variants) that should be used for content on top of errorContainer.
Color used for text and icons displayed on top of the infoContainer color.
The color (and state variants) that should be used for content on top of mainContainer.
Color used for text and icons displayed on top of the mainVariant color.
Color used for text and icons displayed on top of the neutralContainer color.
Color used for text and icons displayed on top of the successContainer color.
The color (and state variants) that should be used for content on top of supportContainer.
Color used for text and icons displayed on top of the supportVariant color.
Utility color used for boundaries for decorative elements when strong contrast is not required.
The preferred tonal color of success containers.
A tonal color to be used in containers.
Darker variation of support color.
Functions
Returns the new background Color to use, representing the original background color with an overlay corresponding to elevation applied. The overlay will only be applied to ColorScheme.surface.
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).
Returns a copy of this Colors, optionally overriding some of the values.
Computes the surface tonal color at different elevation levels e.g. surface1 through surface5.