color

open fun color(value: Colors.() -> ColorProperty)

This function sets the color property for all media devices.

Example call:

color { primary.base } // use the predefined values from the theme (by [dev.fritz2.styling.theme.Theme.colors])
// color { "lime" } // we don't provide common CSS colors at the moment, you must provide them individually
// color { rgba(255, 0, 0, 100) }

Parameters

value

extension function parameter with color type return value, recommended to use predefined values via dev.fritz2.styling.theme.Theme.colors that offer the properties of Colors

open fun color(sm: Colors.() -> ColorProperty? = null, md: Colors.() -> ColorProperty? = null, lg: Colors.() -> ColorProperty? = null, xl: Colors.() -> ColorProperty? = null)

This function sets the color property for each media device independently.

Example call:

color(
sm = { primary.base }
lg = { dark }
)

Parameters

sm

extension function parameter with color type return value for small media devices, recommended to use predefined values via dev.fritz2.styling.theme.Theme.colors that offer the properties of Colors

md

extension function parameter with color type return value for medium sized media devices, recommended to use predefined values via dev.fritz2.styling.theme.Theme.colors that offer the properties of Colors

lg

extension function parameter with color type return value for large media devices, recommended to use predefined values via dev.fritz2.styling.theme.Theme.colors that offer the properties of Colors

xl

extension function parameter with color type return value for extra large media devices, recommended to use predefined values via dev.fritz2.styling.theme.Theme.colors that offer the properties of Colors