Skip to main content

Color Adjustment Filter

A collection of photographic-style tonal and color adjustments in one filter. All fields are optional — omitted fields use their neutral default.

Usage

import { MX } from '@motion-script/core';

<Image src="./photo.jpg" fit="fill" width={600} height={400}
filters={MX.colorAdjustment({
brightness: 0.1,
contrast: 1.15,
saturation: 0.8,
temperature: 0.2,
vignette: 0.3,
})}
/>

// Raw object
filters={[{
type: 'colorAdjustment',
brightness: 0.1,
contrast: 1.15,
saturation: 0.8,
}]}

Props

PropTypeNeutralRangeDescription
type'colorAdjustment'Filter identifier
brightnessnumber0-1 to 1Shifts overall lightness (linear shift, no clipping)
contrastnumber10 to 2Spreads highlights and shadows further apart
saturationnumber10 to 3Scales color saturation uniformly
vibrancenumber0-1 to 1Boosts muted colors more than already-vibrant ones
shadowsnumber0-1 to 1Lifts (positive) or crushes (negative) shadow regions
highlightsnumber0-1 to 1Brightens (positive) or dims (negative) highlight regions
temperaturenumber0-1 to 1Negative = cool (blue), positive = warm (orange)
tintnumber0-1 to 1Negative = green shift, positive = magenta shift
vignettenumber00 to 1Darkens the edges of the frame

All numeric props are interpolated when chained inside a tween via FilterRegistry.

Common recipes

Cinematic look

MX.colorAdjustment({
contrast: 1.1,
saturation: 0.85,
temperature: 0.1,
shadows: 0.05,
highlights: -0.05,
vignette: 0.25,
})

Warm vintage

MX.colorAdjustment({
brightness: 0.05,
saturation: 0.7,
temperature: 0.3,
vignette: 0.4,
})

Cool clean

MX.colorAdjustment({
contrast: 1.05,
temperature: -0.15,
tint: -0.05,
})