HazeBlurStyle

data class HazeBlurStyle(val backgroundColor: Color = Color.Unspecified, val colorEffects: List<HazeColorEffect> = emptyList(), val blurRadius: Dp = Dp.Unspecified, val noiseFactor: Float = -1f, val fallbackColorEffect: HazeColorEffect = HazeColorEffect.Unspecified)

A holder for the style properties used by Haze.

Can be set via dev.chrisbanes.haze.hazeSource and dev.chrisbanes.haze.hazeEffect.

Constructors

Link copied to clipboard
constructor(backgroundColor: Color = Color.Unspecified, colorEffects: List<HazeColorEffect> = emptyList(), blurRadius: Dp = Dp.Unspecified, noiseFactor: Float = -1f, fallbackColorEffect: HazeColorEffect = HazeColorEffect.Unspecified)
constructor(backgroundColor: Color = Color.Unspecified, colorEffect: HazeColorEffect? = null, blurRadius: Dp = Dp.Unspecified, noiseFactor: Float = -1f, fallbackColorEffect: HazeColorEffect = HazeColorEffect.Unspecified)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Color to draw behind the blurred content. Ideally should be opaque so that the original content is not visible behind. Typically this would be MaterialTheme.colorScheme.surface or similar.

Link copied to clipboard

Radius of the blur.

Link copied to clipboard

The HazeTints to apply to the blurred content.

Link copied to clipboard

The HazeTint to use when Haze uses the fallback scrim functionality. The scrim used whenever blurring is disabled, either because the host platform does not support blurring, or it has been manually disabled. When the fallback tint is used, the tints provided in colorEffects are ignored.

Link copied to clipboard

Amount of noise applied to the content, in the range 0f to 1f. Anything outside of that range will be clamped.