contentColorFor

fun SparkColors.contentColorFor(backgroundColor: ERROR CLASS: Symbol not found for Color): ERROR CLASS: Symbol not found for Color

The Material color system contains pairs of colors that are typically used for the background and content color inside a component.

This function tries to match the provided backgroundColor to a 'background' color in this SparkColors, and then will return the corresponding color used for content.

If backgroundColor does not match a background color in the theme, this will return Color.Unspecified.

Return

the matching content color for backgroundColor. If backgroundColor is not present in the theme's SparkColors, then returns Color.Unspecified.

See also


fun contentColorFor(backgroundColor: ERROR CLASS: Symbol not found for Color): ERROR CLASS: Symbol not found for Color

The Material color system contains pairs of colors that are typically used for the background and content color inside a component.

This function tries to match the provided backgroundColor to a 'background' color in the current theme's SparkColors, and then will return the corresponding color used for content.

If backgroundColor does not match a background color in the theme, this will return the current value of LocalContentColor as a best-effort color.

Return

the matching content color for backgroundColor. If backgroundColor is not present in the theme's Colors, then returns the current value of LocalContentColor.

See also