public final class GlassRecipe

  1. Object
  2. GlassRecipe

A typed, named recipe for the “Liquid Glass” backdrop materials (iOS 26).

A glass surface is described by its material INTENT – which named recipe it uses – rather than by loose per-parameter theme constants. Each recipe bundles the bounded, measured parameters of one native material (the colour transform the real UIVisualEffectView / UIGlassEffect applies to the blurred backdrop, plus the edge optics), so similar glass surfaces cannot silently diverge and a theme cannot tune itself into an incoherent material. The available recipes:

  • blurKind.PLAIN_BLUR: backdrop blur only, no material colour transform (a plain CSS backdrop-filter).
  • chromeKind.LIQUID_CHROME: the rectangular chrome bars anchored at a screen edge (navigation / title bars). Very transparent; the backdrop reads through at near-full saturation.
  • pillKind.LIQUID_PILL: the floating pill chrome (the iOS 26 tab bar). Frostier than the edge bars – in light mode it washes strongly toward white while boosting saturation.
  • panelKind.LIQUID_PANEL: a bare glass panel or button capsule (UIGlassEffect). The strongest material: heavy wash, plus edge refraction and a specular rim so the glass reads as a layer on top of the content rather than a flat hole.

A theme assigns a recipe per UIID with the theme constant <UIID>GlassRecipe (for example ToolbarGlassRecipe: chrome), with glassRecipeDefault as the theme-wide default (panel when unset). The recipe is resolved at paint time by Component.internalPaintImpl and its parameters are passed to the port through Graphics.glassRegion; ports never read material constants themselves.

The travelling tab-selection lens is the remaining glass surface; it is an optics-over-content effect bound to the morph motion, so its typed parameters live with the motion model (TabSelectionMorph) rather than here.

Nested types

enum GlassRecipe.KindThe material kind a GlassRecipe renders.

Methods

public static GlassRecipe plainBlur()Plain backdrop blur with no material transform.
public static GlassRecipe liquidChrome(boolean dark)The rectangular edge-anchored chrome bar material (navigation/title bars).
public static GlassRecipe liquidPill(boolean dark)The floating pill chrome material (the iOS 26 tab bar).
public static GlassRecipe liquidPanel(boolean dark)The bare glass panel / button capsule material (UIGlassEffect).
public static GlassRecipe named(String name, boolean dark)Looks up a recipe by its theme name (blur, chrome, pill or panel).
public static GlassRecipe resolve(UIManager manager, String uiid, boolean dark)Resolves the recipe for a UIID from the theme: the per-UIID <UIID>GlassRecipe constant wins, then the theme-wide glassRecipeDefault, then the panel recipe.
public GlassRecipe.Kind getKind()The material kind this recipe renders.
public float getSaturation()The saturation boost applied to the blurred backdrop.
public float getScale()The colour scale multiplier of the material’s affine colour transform.
public float getOffset()The colour offset (wash floor) of the material’s affine colour transform, in 0..255 channel units.
public float getRefraction()The edge refraction (lensing) strength – bends the backdrop toward the edges so the glass reads as a layer on top rather than a flat hole.
public float getSpecular()The brightness of the specular edge rim (the bright glint).

Inherited methods

Method details

plainBlur

public static GlassRecipe plainBlur()
Plain backdrop blur with no material transform.

Returns

the plain-blur recipe

liquidChrome

public static GlassRecipe liquidChrome(boolean dark)
The rectangular edge-anchored chrome bar material (navigation/title bars). Measured against the iOS 26 UINavigationBar glass: the backdrop passes through at near-full strength with only a light wash.

Parameters

dark boolean
true for the dark appearance

Returns

the chrome-bar recipe

liquidPill

public static GlassRecipe liquidPill(boolean dark)
The floating pill chrome material (the iOS 26 tab bar). Frostier than the edge bars: light mode washes strongly toward white while boosting saturation, and a faint specular rim keeps the pill edge legible.

Parameters

dark boolean
true for the dark appearance

Returns

the floating-pill recipe

liquidPanel

public static GlassRecipe liquidPanel(boolean dark)
The bare glass panel / button capsule material (UIGlassEffect). The strongest material: a heavy wash plus edge refraction (lensing) and a specular rim, so a free-standing glass element reads as a layer on top of the content.

Parameters

dark boolean
true for the dark appearance

Returns

the glass-panel recipe

named

public static GlassRecipe named(String name, boolean dark)
Looks up a recipe by its theme name (blur, chrome, pill or panel). Unknown names fall back to the panel recipe – the safest default for a free-standing glass surface.

Parameters

name String
the recipe name from the theme
dark boolean
true for the dark appearance

Returns

the named recipe, never null

resolve

public static GlassRecipe resolve(UIManager manager, String uiid, boolean dark)
Resolves the recipe for a UIID from the theme: the per-UIID <UIID>GlassRecipe constant wins, then the theme-wide glassRecipeDefault, then the panel recipe.

Parameters

manager UIManager
the UI manager holding the theme
uiid String
the component’s UIID
dark boolean
true for the dark appearance

Returns

the resolved recipe, never null

getKind

public GlassRecipe.Kind getKind()
The material kind this recipe renders.

Returns

the kind, never null

getSaturation

public float getSaturation()
The saturation boost applied to the blurred backdrop.

Returns

the saturation multiplier

getScale

public float getScale()
The colour scale multiplier of the material’s affine colour transform.

Returns

the scale factor

getOffset

public float getOffset()
The colour offset (wash floor) of the material’s affine colour transform, in 0..255 channel units.

Returns

the offset

getRefraction

public float getRefraction()
The edge refraction (lensing) strength – bends the backdrop toward the edges so the glass reads as a layer on top rather than a flat hole.

Returns

the refraction strength, 0 = none

getSpecular

public float getSpecular()
The brightness of the specular edge rim (the bright glint).

Returns

the specular strength, 0 = none