duotone
Maps the picture's brightness onto two colours.
tsx
import { Clip, Composition, Effect, Keyframe, Track } from "@cutcraft/kit";
// duotone: Maps the picture's brightness onto two colours.
export default function Video() {
return (
<Composition fps={30} width={640} height={360}>
<Track id="main">
<Clip id="shot" src="asset:coffee" in={12} out={15} fit="cover">
<Effect id="look" type="duotone">
<Keyframe id="k1" param="amount" at={0.5} value={0} />
<Keyframe id="k2" param="amount" at={1.5} value={1} easing="ease-in-out" />
</Effect>
</Clip>
</Track>
</Composition>
);
}The coffee footage is Pixabay videos 209419 and 209424, under the Pixabay Content License.
Params
Drawn as a shader.
| param | type | default |
|---|---|---|
dark | string | "#1d2b53" |
light | string | "#ffd27f" |
amount | number (0..1) | 1 |