GlassAccessibilitySettings

class GlassAccessibilitySettings(val reduceTransparency: Boolean = false, val increaseContrast: Boolean = false, val showBorders: Boolean = false, val reducedTransparencyFallbackColor: Color? = null)

Semantic accessibility preferences that change how Glass separates itself from its content.

Haze deliberately does not read platform accessibility services from common code. Hosts map their platform settings to this value and provide it to the subtree that renders Glass.

Constructors

Link copied to clipboard
constructor(reduceTransparency: Boolean = false, increaseContrast: Boolean = false, showBorders: Boolean = false, reducedTransparencyFallbackColor: Color? = null)

Properties

Link copied to clipboard

Enforces minimum tone contrast and edge separation. Tone contrast applies only to full rendering; fallback rendering omits color adjustments, so it gets the stronger edge alone.

Link copied to clipboard

Opaque base for reduced-transparency fallback, or null for white in light and black in dark host appearance. Set it when the app theme differs from the host appearance. Color.Unspecified is rejected, not treated as null: pass null to select the default.

Link copied to clipboard

Makes Glass materials more opaque by fully diffusing a stronger blur, so content behind them is less legible. Fallback rendering uses an opaque base that follows the system appearance supplied by the Compose host, not MaterialTheme or other in-app theme state. Set reducedTransparencyFallbackColor to match an in-app theme.

Link copied to clipboard

Enforces a visible edge without changing tone contrast.

Functions

Link copied to clipboard
fun copy(reduceTransparency: Boolean = this.reduceTransparency, increaseContrast: Boolean = this.increaseContrast, showBorders: Boolean = this.showBorders, reducedTransparencyFallbackColor: Color? = this.reducedTransparencyFallbackColor): GlassAccessibilitySettings

Returns a copy of these settings with the given values replaced.