Color

@ExperimentalCoroutinesApi
interface Color : StyleParams

This context interface offers functions to style the color related CSS properties of a component.

It only offers two functions

  • color for setting the color, and

  • opacity for setting the opacity of a component.

Both functions have two variants, one for setting the property for all media devices at once and another for setting the properties for each media device independently.

Functions

Link copied to clipboard
open fun color(value: Colors.() -> ColorProperty)

This function sets the color property for all media devices.

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.

Link copied to clipboard
open fun opacity(value: WeightedValueProperty)

This function sets the opacity property for all media devices.

open fun opacity(    sm: WeightedValueProperty? = null,     md: WeightedValueProperty? = null,     lg: WeightedValueProperty? = null,     xl: WeightedValueProperty? = null)

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

Properties

Link copied to clipboard
abstract val lgProperties: StringBuilder

collects the properties for large screens

Link copied to clipboard
abstract val mdProperties: StringBuilder

collects the properties for middle-sized screens

Link copied to clipboard
abstract val smProperties: StringBuilder

collects the properties for small screens

Link copied to clipboard
abstract val xlProperties: StringBuilder

collects the properties for extra-large screens

Inheritors

Link copied to clipboard