Search
Loading...
Skip to content

Supported Filters and Effects

Discover all available filters and effects in CE.SDK and learn how to check if a block supports them.

5 mins
estimated time
Download
StackBlitz
GitHub

CE.SDK provides 22 built-in effect types for visual transformations including color adjustments, blur effects, artistic filters, and distortion effects. This reference guide shows how to check effect support and add effects programmatically, followed by detailed property tables for each effect type.

This guide covers checking effect support on blocks, adding effects programmatically, and the complete list of available effect types with their properties. For detailed tutorials on configuring and combining multiple effects, see the Apply Filters and Effects guide.

Check Effect Support#

Before applying effects to a block, verify whether it supports them using supportsEffects(). Not all block types can have effects applied.

// Check if a block supports effects before applying them
// Not all block types support effects - verify first to avoid errors
// Add an image to demonstrate effects (centered below text)
const imageUri = 'https://img.ly/static/ubq_samples/sample_1.jpg';
const imageBlock = await engine.block.addImage(imageUri, {
size: { width: 300, height: 210 }
});
engine.block.appendChild(page, imageBlock);
// Center the image below the subtext
engine.block.setPositionX(imageBlock, (800 - 300) / 2); // 250
engine.block.setPositionY(imageBlock, 310);
// Image blocks support effects
const imageSupportsEffects = engine.block.supportsEffects(imageBlock);
console.log('Image supports effects:', imageSupportsEffects); // true

Effect support is available for:

  • Graphic blocks with image or video fills
  • Shape blocks with fills
  • Text blocks (with limited effect types)
  • Page blocks (particularly when they have background fills)

Add an Effect#

Create an effect using createEffect() with the effect type identifier, then attach it to a block with appendEffect().

// Create an effect using the effect type identifier
// CE.SDK provides 22 built-in effect types (see property tables below)
const duotoneEffect = engine.block.createEffect('duotone_filter');
// Append the effect to the image's effect stack
engine.block.appendEffect(imageBlock, duotoneEffect);

Configure Effect Properties#

Configure effect parameters using setter methods. Property paths follow the format effect/{effect-type}/{property-name}.

// Configure effect properties using the property path format:
// effect/{effect-type}/{property-name}
// Set duotone colors to match the dark blue gradient background
engine.block.setColor(duotoneEffect, 'effect/duotone_filter/darkColor', {
r: 0.02,
g: 0.04,
b: 0.12,
a: 1.0
}); // Near black blue
engine.block.setColor(duotoneEffect, 'effect/duotone_filter/lightColor', {
r: 0.5,
g: 0.7,
b: 1.0,
a: 1.0
}); // Light blue
engine.block.setFloat(duotoneEffect, 'effect/duotone_filter/intensity', 0.8);

CE.SDK provides typed setter methods for different parameter types:

  • setFloat() - For intensity, amount, and decimal values
  • setInt() - For discrete values like pixel sizes
  • setString() - For file URIs (LUT files)
  • setBool() - For enabling or disabling features
  • setColor() - For color values (RGBA format)

Retrieve Applied Effects#

Use getEffects() to retrieve all effects applied to a block.

// Retrieve all effects applied to a block
const appliedEffects = engine.block.getEffects(imageBlock);
console.log('Number of applied effects:', appliedEffects.length);
// Log each effect's type
appliedEffects.forEach((effect, index) => {
const effectType = engine.block.getType(effect);
console.log(`Effect ${index}: ${effectType}`);
});

Effects#

The following tables document all available effect types and their configurable properties.

Adjustments Type#

An effect block for basic image adjustments.

This section describes the properties available for the Adjustments Type (//ly.img.ubq/effect/adjustments) block type.

PropertyTypeDefaultDescription
effect/adjustments/blacksFloat0Adjustment of only the blacks.
effect/adjustments/brightnessFloat0Adjustment of the brightness.
effect/adjustments/clarityFloat0Adjustment of the detail.
effect/adjustments/contrastFloat0Adjustment of the contrast.
effect/adjustments/exposureFloat0Adjustment of the exposure.
effect/adjustments/gammaFloat0Gamma correction, non-linear.
effect/adjustments/highlightsFloat0Adjustment of only the highlights.
effect/adjustments/saturationFloat0Adjustment of the saturation.
effect/adjustments/shadowsFloat0Adjustment of only the shadows.
effect/adjustments/sharpnessFloat0Adjustment of the sharpness.
effect/adjustments/temperatureFloat0Adjustment of the color temperature.
effect/adjustments/whitesFloat0Adjustment of only the whites.
effect/enabledBooltrueWhether the effect is enabled.

Cross Cut Type#

An effect that distorts the image with horizontal slices.

This section describes the properties available for the Cross Cut Type (//ly.img.ubq/effect/cross_cut) block type.

PropertyTypeDefaultDescription
effect/cross_cut/offsetFloat0.07Horizontal offset per slice.
effect/cross_cut/slicesFloat5Number of horizontal slices.
effect/cross_cut/speedVFloat0.5Vertical slice position.
effect/cross_cut/timeFloat1Randomness input.
effect/enabledBooltrueWhether the effect is enabled.

Dot Pattern Type#

An effect that displays the image using a dot matrix.

This section describes the properties available for the Dot Pattern Type (//ly.img.ubq/effect/dot_pattern) block type.

PropertyTypeDefaultDescription
effect/dot_pattern/blurFloat0.3Global blur.
effect/dot_pattern/dotsFloat30Number of dots.
effect/dot_pattern/sizeFloat0.5Size of an individual dot.
effect/enabledBooltrueWhether the effect is enabled.

Duotone Filter Type#

An effect that applies a two-tone color mapping.

This section describes the properties available for the Duotone Filter Type (//ly.img.ubq/effect/duotone_filter) block type.

PropertyTypeDefaultDescription
effect/duotone_filter/darkColorColor{"r":0,"g":0,"b":0,"a":0}The darker of the two colors. Negative filter intensities emphasize this color.
effect/duotone_filter/intensityFloat0The mixing weight of the two colors in the range [-1, 1].
effect/duotone_filter/lightColorColor{"r":0,"g":0,"b":0,"a":0}The brighter of the two colors. Positive filter intensities emphasize this color.
effect/enabledBooltrueWhether the effect is enabled.

Extrude Blur Type#

An effect that applies a radial extrude blur.

This section describes the properties available for the Extrude Blur Type (//ly.img.ubq/effect/extrude_blur) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/extrude_blur/amountFloat0.2Blur intensity.

Glow Type#

An effect that applies an artificial glow.

This section describes the properties available for the Glow Type (//ly.img.ubq/effect/glow) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/glow/amountFloat0.5Glow brightness.
effect/glow/darknessFloat0.3Glow darkness.
effect/glow/sizeFloat4Intensity of the glow.

Green Screen Type#

An effect that replaces a specific color with transparency.

This section describes the properties available for the Green Screen Type (//ly.img.ubq/effect/green_screen) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/green_screen/colorMatchFloat0.4Threshold between the source color and the from color.
effect/green_screen/fromColorColor{"r":0,"g":1,"b":0,"a":1}The color to be replaced.
effect/green_screen/smoothnessFloat0.08Controls the rate at which the color transition increases when the similarity threshold is exceeded.
effect/green_screen/spillFloat0Controls the desaturation of the source color to reduce color spill.

Half Tone Type#

An effect that overlays a halftone pattern.

This section describes the properties available for the Half Tone Type (//ly.img.ubq/effect/half_tone) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/half_tone/angleFloat0Angle of pattern.
effect/half_tone/scaleFloat0.5Scale of pattern.

Linocut Type#

An effect that overlays a linocut pattern.

This section describes the properties available for the Linocut Type (//ly.img.ubq/effect/linocut) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/linocut/scaleFloat0.5Scale of pattern.

Liquid Type#

An effect that applies a liquefy distortion.

This section describes the properties available for the Liquid Type (//ly.img.ubq/effect/liquid) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/liquid/amountFloat0.06Severity of the applied effect.
effect/liquid/scaleFloat0.62Global scale.
effect/liquid/timeFloat0.5Continuous randomness input.

Lut Filter Type#

An effect that applies a color lookup table (LUT).

This section describes the properties available for the Lut Filter Type (//ly.img.ubq/effect/lut_filter) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/lut_filter/horizontalTileCountInt5The horizontal number of tiles contained in the LUT image.
effect/lut_filter/intensityFloat1A value in the range of [0, 1]. Defaults to 1.0.
effect/lut_filter/lutFileURIString""The URI to a LUT PNG file.
effect/lut_filter/verticalTileCountInt5The vertical number of tiles contained in the LUT image.

Mirror Type#

An effect that mirrors the image along a central axis.

This section describes the properties available for the Mirror Type (//ly.img.ubq/effect/mirror) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/mirror/sideInt1Axis to mirror along.

Outliner Type#

An effect that highlights the outlines in an image.

This section describes the properties available for the Outliner Type (//ly.img.ubq/effect/outliner) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/outliner/amountFloat0.5Intensity of edge highlighting.
effect/outliner/passthroughFloat0.5Visibility of input image in non-edge areas.

Pixelize Type#

An effect that pixelizes the image.

This section describes the properties available for the Pixelize Type (//ly.img.ubq/effect/pixelize) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/pixelize/horizontalPixelSizeInt20The number of pixels on the x-axis.
effect/pixelize/verticalPixelSizeInt20The number of pixels on the y-axis.

Posterize Type#

An effect that reduces the number of colors in the image.

This section describes the properties available for the Posterize Type (//ly.img.ubq/effect/posterize) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/posterize/levelsFloat3Number of color levels.

Radial Pixel Type#

An effect that reduces the image into radial pixel rows.

This section describes the properties available for the Radial Pixel Type (//ly.img.ubq/effect/radial_pixel) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/radial_pixel/radiusFloat0.1Radius of an individual row of pixels, relative to the image.
effect/radial_pixel/segmentsFloat0.01Proportional size of a pixel in each row.

Recolor Type#

An effect that replaces one color with another.

This section describes the properties available for the Recolor Type (//ly.img.ubq/effect/recolor) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/recolor/brightnessMatchFloat1Affects the weight of brightness when calculating color similarity.
effect/recolor/colorMatchFloat0.4Threshold between the source color and the from color.
effect/recolor/fromColorColor{"r":1,"g":1,"b":1,"a":1}The color to be replaced.
effect/recolor/smoothnessFloat0.08Controls the rate at which the color transition increases when the similarity threshold is exceeded.
effect/recolor/toColorColor{"r":0,"g":0,"b":1,"a":1}The color to replace with.

Sharpie Type#

Cartoon-like effect.

This section describes the properties available for the Sharpie Type (//ly.img.ubq/effect/sharpie) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.

Shifter Type#

An effect that shifts individual color channels.

This section describes the properties available for the Shifter Type (//ly.img.ubq/effect/shifter) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/shifter/amountFloat0.05Intensity of the shift.
effect/shifter/angleFloat0.3Shift direction.

Tilt Shift Type#

An effect that applies a tilt-shift blur.

This section describes the properties available for the Tilt Shift Type (//ly.img.ubq/effect/tilt_shift) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/tilt_shift/amountFloat0.016Blur intensity.
effect/tilt_shift/positionFloat0.4Horizontal position in image.

Tv Glitch Type#

An effect that mimics TV banding and distortion.

This section describes the properties available for the Tv Glitch Type (//ly.img.ubq/effect/tv_glitch) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/tv_glitch/distortionFloat3Rough horizontal distortion.
effect/tv_glitch/distortion2Float1Fine horizontal distortion.
effect/tv_glitch/rollSpeedFloat1Vertical offset.
effect/tv_glitch/speedFloat2Number of changes per time change.

Vignette Type#

An effect that adds a vignette (darkened corners).

This section describes the properties available for the Vignette Type (//ly.img.ubq/effect/vignette) block type.

PropertyTypeDefaultDescription
effect/enabledBooltrueWhether the effect is enabled.
effect/vignette/darknessFloat1Brightness of vignette.
effect/vignette/offsetFloat1Radial offset.

Next Steps#