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 AI containers.
The preferred tonal color of warning containers.
The background color that appears behind scrollable content.
An alternate background color for surfaces that need visual separation from background.
The preferred tonal color of business containers.
The preferred tonal color of error containers.
The preferred tonal color of focus 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.
The preferred tonal color of new containers.
Color used for text and icons displayed on top of the aiContainer color.
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 backgroundVariant.
Color used for text and icons displayed on top of the business color.
Color used for text and icons displayed on top of the businessContainer 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 focusContainer color.
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 newContainer color.
Color used for text and icons displayed on top of the serviceContainer 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 service containers.
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 backgroundColor with an overlay corresponding to elevation applied. The overlay will only be applied to SparkColors.surface.
Converts a SparkColors instance to a Material 3 ColorScheme.
The Material color system contains pairs of colors that are typically used for the background and content color inside a component.
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.