packages/docs/docs/effects/contrast.mdx
Part of the @remotion/effects package.
A contrast adjustment effect that can be applied to canvas-based components such as <Video>, <HtmlInCanvas> and <Solid>.
import {AbsoluteFill} from 'remotion';
import {Video} from '@remotion/media';
import {contrast} from '@remotion/effects/contrast';
export const MyComp: React.FC = () => {
return (
<AbsoluteFill>
<Video src="https://remotion.media/video.mp4" effects={[contrast({amount: 1.25})]} />
</AbsoluteFill>
);
};
Pass an object with the following properties. You can also call contrast() without arguments.
amount?Contrast multiplier. Must be >= 0.
1 leaves the layer unchanged0 produces a flat mid-gray image1 increase contrast0 and 1 reduce contrastDefaults to 1.
disabled?When true, the effect is skipped. Defaults to false.
If you stack color-correction effects, a common order is:
brightness() → contrast() → saturation() → hue()
brightness() and contrast() are not commutative – swapping their order changes the result, because contrast scales around the mid-gray point (128) of the current layer.