Raven Docs

Filters

Every basic filter Raven Effects ships, its parameters, valid ranges, and what invalid input does.

Every filter below is exported from effects.filters (@corvidhq/effects, re-exported as effectFilters from @corvidhq/react). Each factory validates its parameters immediately and throws EffectsError with code RAVEN_EFFECT_INVALID_CONFIG on an out-of-range or unknown value — invalid configuration never silently clamps.

effects.filters.brightness({ value: 0.2 });
effects.filters.brightness();              // uses the documented default
effects.filters.brightness({ value: 5 });  // throws RAVEN_EFFECT_INVALID_CONFIG

Color filters

These run as one combined shader pass on the GPU engine, in the order they were added to the pipeline — see Pipeline for how ordering composes.

FilterParameterRangeDefaultEffect
brightnessvalue-1 to 10Additive shift applied to every channel.
contrastvalue-1 to 10Scales each channel around mid-gray (0.5).
saturationvalue0 to 21Blends toward (0) or away from (2) grayscale.
exposurestops-2 to 20Multiplicative brightness in photographic stops — each +1 doubles brightness.
temperaturevalue-1 to 10Red/blue balance — negative is cooler, positive is warmer.
tintvalue-1 to 10Green/magenta balance.
grayscaleamount0 to 11Blend toward fully desaturated.
sepiaamount0 to 11Blend toward a classic sepia tone.
effects.filters.contrast({ value: 0.15 });
effects.filters.exposure({ stops: 0.5 });
effects.filters.temperature({ value: -0.3 }); // cooler

Spatial filters

Spatial filters read neighboring pixels, so each gets its own render pass rather than folding into the color shader.

FilterParameterRangeDefaultEffect
blurradius0 to 20 (pixels)6Gaussian blur — a real two-pass separable blur on the GPU engine, a box-blur approximation on the CPU fallback.
effects.filters.blur({ radius: 8 });

beauty.smooth({ amount }) is a related, separately-namespaced filter — see Presets for why it isn't listed as a basic filter.

Adding a filter to a pipeline

const pipeline = effects.createPipeline();
const instance = pipeline.add(effects.filters.brightness({ value: 0.2 }));
 
instance.id;      // stable id — pass to update()/remove()
instance.enabled; // true by default
instance.params;  // { value: 0.2 }
  • Presets — pure compositions of the filters above.
  • Pipeline — add/remove/update/reorder/enable/disable/clear.
  • API Reference — full type signatures.