Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

Node / Canvas · guide

Transparent base (transparentBase)

Current Apexify.js 6.0.0 documentation for Transparent base (transparentBase).

apexify.jsRuntime: nodeCURRENTSince 6.0.0

Problem it solves

If you do not set colorBg, gradientBg, customBg, or videoBg, CanvasCreator would normally fill with opaque black #000.


What transparentBase: true does

Skips that default black so your scene can start from transparency, then build visibility using bgLayers and/or patternBg / noiseBg.

SOURCEtypescript
typescript
Studio
await painter.createCanvas({  width: 400,  height: 400,  transparentBase: true,  bgLayers: [    { type: 'color', value: 'rgba(99, 102, 241, 0.4)' },  ],});

When to use

  • PNG exports that need real alpha outside UI widgets.
  • Stickers or overlays where only stacked layers should define visible pixels.

When not to use

  • Simple solid banners → just set colorBg.
  • Full-bleed photos → use customBg.

Next steps