duotone
Repaint the child in two colors: colorA for the shadows, colorB for the highlights.
duotone(slots: {colorA: PropRef; colorB: PropRef; blend: ArgSpec; colorSpace: PropRef}): PointwiseEffect
Import effects from shaders/std and use effects.color.duotone.
blend (0–1) is the brightness where the two meet. colorSpace is a select prop with transform: transformColorSpace and compileTime: true; it picks the space the colors mix in ('oklch' for vivid, 'linear' for plain). Alpha kept.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {colorA: PropRef; colorB: PropRef; blend: ArgSpec; colorSpace: PropRef} |
Example
effect: duotone({colorA: p('colorA'), colorB: p('colorB'), blend: p('blend'), colorSpace: p('colorSpace')})
See also
tritone— Repaint the child in three colors:colorAfor the shadows,colorBfor the midtones,colorCfor the highlights.gradientMap— Recolor the child by its brightness through a gradient, the Photoshop gradient map.grayscale— Turn the child black and white, weighted the way the eye sees brightness.