Control how design blocks visually blend with underlying layers using CE.SDK’s blend mode system for professional layered compositions.

Blend modes control how a block’s colors combine with underlying layers, similar to blend modes in Photoshop or other design tools. CE.SDK provides 27 blend modes organized into categories: Normal, Darken, Lighten, Contrast, Inversion, and Component. Each category serves different compositing needs—darken modes make images darker, lighten modes make them brighter, and contrast modes increase midtone contrast.
This guide covers how to check blend mode support, apply blend modes programmatically, understand the available blend mode options, and combine blend modes with opacity for fine control over layer compositing.
Checking Blend Mode Support#
Before applying a blend mode, verify that the block supports it using supportsBlendMode(). Most graphic blocks support blend modes, but always check to avoid errors.
// Check if the block supports blend modes before applyingif (engine.block.supportsBlendMode(overlayBlock)) {Blend mode support is available for graphic blocks with image or video fills, shape blocks, and text blocks. Page blocks and scene blocks typically do not support blend modes directly.
Setting and Getting Blend Modes#
Apply a blend mode with setBlendMode() and retrieve the current mode with getBlendMode(). The default blend mode is 'Normal', which displays the block without any blending effect.
// Apply a different blend mode to each overlayconst blendMode = blendModes[index];engine.block.setBlendMode(overlayBlock, blendMode);After setting a blend mode, you can confirm the change by retrieving the current value:
// Retrieve and log the current blend modeconst currentMode = engine.block.getBlendMode(overlayBlock);console.log(`Cell ${index + 1} blend mode:`, currentMode);Available Blend Modes#
CE.SDK provides 27 blend modes organized into categories, each producing different visual results:
Normal Modes#
PassThrough- Allows children of a group to blend with layers below the groupNormal- Default mode with no blending effect
Darken Modes#
These modes darken the result by comparing the base and blend colors:
Darken- Selects the darker of the base and blend colorsMultiply- Multiplies colors, producing darker results (great for shadows)ColorBurn- Darkens base color by increasing contrastLinearBurn- Darkens base color by decreasing brightnessDarkenColor- Selects the darker color based on luminosity
Lighten Modes#
These modes lighten the result by comparing colors:
Lighten- Selects the lighter of the base and blend colorsScreen- Multiplies the inverse of colors, producing lighter results (great for highlights)ColorDodge- Lightens base color by decreasing contrastLinearDodge- Lightens base color by increasing brightnessLightenColor- Selects the lighter color based on luminosity
Contrast Modes#
These modes increase midtone contrast:
Overlay- Combines Multiply and Screen based on the base colorSoftLight- Similar to Overlay but with a softer effectHardLight- Similar to Overlay but based on the blend colorVividLight- Burns or dodges colors based on the blend colorLinearLight- Increases or decreases brightness based on blend colorPinLight- Replaces colors based on the blend colorHardMix- Reduces colors to white, black, or primary colors
Inversion Modes#
These modes create inverted or subtracted effects:
Difference- Subtracts the darker from the lighter colorExclusion- Similar to Difference with lower contrastSubtract- Subtracts blend color from base colorDivide- Divides base color by blend color
Component Modes#
These modes affect specific color components:
Hue- Uses the hue of the blend color with base saturation and luminositySaturation- Uses the saturation of the blend colorColor- Uses the hue and saturation of the blend colorLuminosity- Uses the luminosity of the blend color
Combining Blend Modes with Opacity#
For finer control over compositing, combine blend modes with opacity. Opacity reduces overall visibility while the blend mode affects color interaction with underlying layers.
// Check if the block supports opacityif (engine.block.supportsOpacity(overlayBlock)) { // Set the opacity to 80% for clear visibility engine.block.setOpacity(overlayBlock, 0.8);}You can retrieve the current opacity value to confirm changes or read existing state:
// Retrieve and log the opacity valueconst opacity = engine.block.getOpacity(overlayBlock);console.log(`Cell ${index + 1} opacity:`, opacity);Troubleshooting#
Blend Mode Has No Visible Effect#
If a blend mode doesn’t produce visible changes:
- Ensure there are underlying layers for the block to blend with. Blend modes only affect compositing with content below.
- Verify the blend mode is applied to the correct block using
getBlendMode(). - Check that the block has visible content (fill or image) to blend.
Cannot Set Blend Mode#
If setBlendMode() throws an error:
- Check that
supportsBlendMode()returnstruefor the block. - Verify the block ID is valid and the block exists in the scene.
- Ensure you’re passing a valid blend mode string from the available options.
Unexpected Blending Results#
If the visual result doesn’t match expectations:
- Verify the blend mode category matches your intent (darken vs lighten vs contrast).
- Check the stacking order of blocks—blend modes affect content below the block.
- Experiment with different blend modes from the same category to find the best visual match.
API Reference#
| Method | Description |
|---|---|
engine.block.supportsBlendMode(id) | Check if a block supports blend modes |
engine.block.setBlendMode(id, mode) | Set the blend mode for a block |
engine.block.getBlendMode(id) | Get the current blend mode of a block |
engine.block.supportsOpacity(id) | Check if a block supports opacity |
engine.block.setOpacity(id, opacity) | Set the opacity for a block (0-1) |
engine.block.getOpacity(id) | Get the current opacity of a block |