Effects, masks, and composite

Ordered operators

Effects are explicit operators evaluated in order. The order is part of the visual meaning.

{
  "effects": [
    { "type": "blur", "radius": 24 },
    { "type": "shadow", "source": "alpha", "offset": { "x": 18, "y": 20 }, "blur": 16, "spread": 0, "color": "#00000040", "inset": false }
  ],
  "composite": { "opacity": 1, "blendMode": "normal" }
}

Atomic effects

The layer effects list supports these deterministic atomic operators. A list may contain at most eight effects, and every effect id must be unique within that layer.

TypePurposeMain fields
color-adjustBrightness, contrast, saturation and hue in one operatorbrightness, contrast, saturation, hueRotate
grayscaleInterpolate from the source color to grayscaleamount: 0–1
sepiaInterpolate from the source color to sepiaamount: 0–1
invertInterpolate toward inverted coloramount: 0–1
filter-opacityApply alpha as an ordered filter operationamount: 0–1
blurGaussian blur of the rendered layerradius
shadowBox shadow or alpha/drop shadowsource, offset, blur, spread, color, inset
outer-glowGlow outside the final alpha silhouetteradius, color, opacity
inner-glowGlow inside the final alpha silhouetteradius, color, opacity
noiseDeterministic grain over the layer surfacescale, amount, opacity, seed

Example combining color, blur, glow and deterministic grain:

{
  "effects": [
    {
      "id": "tone",
      "type": "color-adjust",
      "brightness": 0.04,
      "contrast": 1.08,
      "saturation": 1.15,
      "hueRotate": 0
    },
    { "id": "soften", "type": "blur", "radius": 8 },
    { "id": "halo", "type": "outer-glow", "radius": 18, "color": "#2ee6c5", "opacity": 0.55 },
    { "id": "grain", "type": "noise", "scale": 2, "amount": 0.08, "opacity": 0.2, "seed": 42 }
  ]
}

Shadow sources

shadow has two explicit sources:

  • box: uses the layer border box and supports spread and inset.
  • alpha: follows the rendered alpha silhouette; spread must be 0 and inset must be false.
{
  "id": "card-shadow",
  "type": "shadow",
  "source": "box",
  "offset": { "x": 0, "y": 16 },
  "blur": 24,
  "spread": 0,
  "color": "#00000066",
  "inset": false
}

Root filter graphs

For SVG filter graphs, define a filter in the document's filters collection and reference it from a layer with filter. Filter primitives are ordered and can pass named results to later primitives:

feBlend, feColorMatrix, feComponentTransfer, feComposite, feConvolveMatrix, feDisplacementMap, feDropShadow, feFlood, feGaussianBlur, feImage, feMerge, feMorphology, feOffset, feTile, feTurbulence, feDiffuseLighting and feSpecularLighting.

Use atomic effects for common motion styling. Use a root filter graph when you need compositing, channel math, displacement, convolution, turbulence, merge or lighting primitives.

Masks

Clip paths, alpha/luminance masks, and isolation describe coverage and compositing relationships. They are not high-level layout features.

Masks can be vector content or an image asset. A mask uses alpha or luminance mode; multiple CSS mask layers combine with add, subtract, intersect or exclude.

{
  "masks": [{
    "id": "reveal-mask",
    "maskType": "luminance",
    "children": [{
      "type": "circle",
      "cx": 240,
      "cy": 135,
      "r": 120,
      "fill": { "type": "solid", "color": "#ffffff" }
    }]
  }],
  "layers": [{
    "id": "photo",
    "mask": "reveal-mask"
  }]
}

Paint and composite opacity

Fill opacity and stroke opacity belong to their paint sources. Layer/composite opacity belongs to the composite result. Keeping them separate makes effect and export behavior predictable.

composite.blendMode supports normal, darken, multiply, color-burn, lighten, screen, color-dodge, overlay, soft-light, hard-light, difference, exclusion, hue, saturation, color and luminosity. Use isolation: "isolate" when a group must composite independently.

backdropEffects applies the same atomic effect vocabulary to the already-painted backdrop rather than to the layer's own source.

Static teaching boundary

The figures in the web guide are explanatory pictures. They do not execute an offscreen pass or initialize a graphics API.