asSparkColors
Converts a Material ColorScheme to a SparkColors instance.
This function adapts the color values from a Material Design ColorScheme to the structure and naming conventions used by SparkColors. The following tokens SparkColors.mainVariant, SparkColors.accentVariant, SparkColors.supportVariant and their on-counterparts have no equivalent in Material, so they are derived from their principal token with a different tone (90/10 or 10/99). It handles both light and dark themes by adjusting the color tones accordingly.
Return
A SparkColors populated with color values derived from the provided ColorScheme.
Parameters
useDark
Whether to generate colors for a dark theme as the tone used for variants is different in a dark theme