Base SVG Filters Reference
Visual filters for base SVG layer Apply opacity, blur, brightness, tint, and other effects to make overlays more prominent
Overview
Apply visual filters to the base SVG layer to make overlays more prominent while keeping overlays crisp and clear.
Quick Start
Simple filters (legacy object format, CSS filters only):
base_svg:
source: builtin:ncc-1701-a-blue
filters:
opacity: 0.5
blur: "3px"Stackable filters (array format, supports CSS and SVG filter primitives):
base_svg:
source: builtin:ncc-1701-a-blue
filters:
- { mode: css, type: opacity, value: 0.5 }
- { mode: svg, type: tint, value: { color: 'rgba(180,0,0,0.35)' } }Filter Types
Opacity
Controls transparency of base SVG (0.0 = invisible, 1.0 = fully opaque).
filters:
opacity: 0.5 # 50% transparentUse cases: Dim background artwork to emphasize overlays.
Blur
Applies Gaussian blur (softens focus).
filters:
blur: "3px" # Moderate blurUse cases: Create depth, de-emphasize background detail.
Brightness
Adjusts brightness level (1.0 = normal, <1.0 = darker, >1.0 = brighter).
filters:
brightness: 0.7 # 30% darkerUse cases: Darken background, adjust visibility.
Contrast
Adjusts contrast (1.0 = normal, <1.0 = lower contrast, >1.0 = higher contrast).
filters:
contrast: 0.8 # Reduce contrastUse cases: Soften harsh edges, mute colors.
Grayscale
Converts to grayscale (0.0 = full color, 1.0 = completely gray).
filters:
grayscale: 0.5 # 50% desaturatedUse cases: Monochrome displays, reduced visual weight.
Sepia
Applies sepia tone (warm brown tint).
filters:
sepia: 0.3 # Slight warmthUse cases: Vintage aesthetic, warm backgrounds.
Hue Rotate
Rotates colors around the color wheel (in degrees).
filters:
hue_rotate: 45 # Shift hues by 45 degreesUse cases: Color theme adjustments, alert states.
Saturate
Adjusts color saturation (1.0 = normal, <1.0 = less saturated, >1.0 = more saturated).
filters:
saturate: 0.6 # Reduce saturationUse cases: Mute vibrant colors, adjust visual intensity.
Invert
Inverts colors (0.0 = normal, 1.0 = fully inverted).
filters:
invert: 0.2 # Slight inversionUse cases: High-contrast themes, special effects.
Drop Shadow
Creates a drop shadow behind the element.
filters:
- { mode: css, type: drop-shadow, value: { x: 2, y: 2, blur: '4px', color: '#000000' } }Use cases: Depth/emphasis via a classic drop shadow.
SVG Filter Primitives
Lower-level SVG <filter> primitives, for effects the CSS filter list above can't express. Requires array format with mode: svg — SVG filters need an <svg> root, so these aren't available on non-SVG cards like data-grid. Chain multiple primitives in the same filters: array to compose more complex effects (each primitive's output feeds the next).
feGaussianBlur
SVG blur filter — smoother than CSS blur, chains with other SVG filters.
filters:
- { mode: svg, type: feGaussianBlur, value: { stdDeviation: 4 } }Use cases: Softening, glow bases, chaining with feOffset for shadows.
feColorMatrix
Powerful color transformation using matrix operations. Supports hue rotation, saturation, luminance-to-alpha, and custom 4x5 color mapping matrices.
filters:
- { mode: svg, type: feColorMatrix, value: { type: saturate, values: 1.5 } }Use cases: Advanced color remapping beyond CSS saturate/hue-rotate.
feOffset
Shifts the filter result by dx/dy pixels. Essential for creating shadow effects when combined with blur.
filters:
- { mode: svg, type: feOffset, value: { dx: 3, dy: 3 } }Use cases: Building custom shadow effects when chained with feGaussianBlur/feBlend.
feBlend
Blends the current filter result with another input (SourceGraphic by default) using any of the 16 standard CSS blend modes (multiply, screen, overlay, etc.).
filters:
- { mode: svg, type: feBlend, value: { mode: screen } }Use cases: Glow effects — try screen/lighten mode after a blur.
feComposite
Combines two inputs (the previous filter result and SourceGraphic by default) using Porter-Duff compositing operators, or a custom arithmetic formula.
filters:
- { mode: svg, type: feComposite, value: { operator: over } }Use cases: Advanced layering/compositing beyond simple blend modes.
feMorphology
Erodes (thins) or dilates (fattens) shapes. Useful for creating outline effects or adjusting edge thickness.
filters:
- { mode: svg, type: feMorphology, value: { operator: dilate, radius: 2 } }Use cases: Outline/edge-thickness effects.
feTurbulence
Generates Perlin noise patterns for organic textures. Commonly used with feDisplacementMap for distortion/warping effects.
filters:
- { mode: svg, type: feTurbulence, value: { baseFrequency: 0.02, numOctaves: 3 } }Use cases: Organic noise textures, paired with feDisplacementMap.
feDisplacementMap
Warps/distorts the image based on color values from another source. Perfect for wavy, liquid, or turbulent effects.
filters:
- { mode: svg, type: feTurbulence, value: { baseFrequency: 0.02, numOctaves: 3 } }
- { mode: svg, type: feDisplacementMap, value: { scale: 20 } }Use cases: Wavy, liquid, or turbulent distortion effects.
TIP
Add a Turbulence filter right before this one — Turbulence generates the displacement map this filter distorts by.
Tint
The one friendly compound SVG type — internally expands to a chained feFlood+feComposite pair, so it composites a flat color wash over the base SVG (a real color tint, not an approximation) from a single filter entry. Same SVG-only requirement as the primitives above — not available on non-SVG cards like data-grid. The color's alpha channel controls how much of the artwork shows through.
filters:
- { mode: svg, type: tint, value: { color: 'rgba(180,0,0,0.35)' } }Use cases: Alert/status washes, theme-colored overlays, quick visual state changes.
Common Filter Recipes
Copy-paste filters: arrays for common effects.
Dimmed
Reduces opacity and brightness for a subtle background.
filters:
opacity: 0.5
brightness: 0.8Best for: General use, balanced visibility.
Subtle
Light dimming with slight blur and desaturation.
filters:
opacity: 0.6
blur: "1px"
grayscale: 0.2Best for: Maintaining detail while reducing emphasis.
Backdrop
Heavy dimming with blur for strong overlay emphasis.
filters:
opacity: 0.3
blur: "3px"
brightness: 0.6Best for: Data-heavy displays, prominent overlays.
Faded
Desaturated and dimmed for a muted background.
filters:
opacity: 0.4
grayscale: 0.5
contrast: 0.7Best for: Minimal aesthetic, reduced visual clutter.
Red Wash (alert)
A real red color tint using the SVG tint filter, rather than the old red-alert preset's hue-rotate approximation.
filters:
- { mode: svg, type: tint, value: { color: 'rgba(180,0,0,0.35)' } }Best for: Alert states, emergency displays.
Monochrome
Full grayscale with reduced contrast.
filters:
opacity: 0.6
grayscale: 1.0
contrast: 0.8Best for: Professional displays, reduced color distraction.
Clear all filters
filters: []Overlay-Only Mode
Create cards without any base SVG (pure overlay displays).
base_svg:
source: "none"
view_box: [0, 0, 1920, 1200] # REQUIRED when source is "none"
overlays:
- type: control
id: main_display
# ... overlay configRequirements:
view_boxmust be explicitly defined (4-element array)- No anchor extraction (all overlays need explicit coordinates)
Use cases:
- Pure data displays
- Custom overlay compositions
- Testing/prototyping