How a duotone is made, pixel by pixel
A duotone first throws away the colour of a photo and keeps only its brightness. Brightness here is luma: 21% of the red, plus 72% of the green, plus 7% of the blue. Those Rec. 709 weights follow the eye, which sees green as far brighter than blue at the same strength. The result is one number per pixel, from 0 for black to 255 for white, exactly like a black and white version of the photo.
Then each brightness becomes a colour. Think of a straight line from the shadow colour to the highlight colour. A brightness of 0 sits at the shadow end, 255 at the highlight end, and everything else in between, in proportion. With Navy and coral, black becomes navy, 27, 38, 79, white becomes coral, 255, 138, 101, and a mid grey of 128 becomes 141, 88, 90, a dusty rose half way along.
A worked example shows why the original colours do not matter, only their brightness. A pure red pixel, 255, 0, 0, has a luma of only 54, because red looks darker than its number suggests. With Navy and coral it becomes 75, 59, 84, close to the navy end. A mid green, 0, 128, 0, has a luma of 92 and becomes 109, 74, 87. Two very different colours in the photo end up as two nearby shades of the same gradient.
That is also the main design rule for picking a pair: the shadow colour should be clearly darker than the highlight colour. Then the photo keeps its shapes, because dark parts stay dark and light parts stay light. If the two colours are about as bright as each other, say a mid red and a mid blue, every pixel ends up a similar brightness and the picture flattens into a coloured smear. The ready pairs all follow the rule; check your own pair against the preview.
The limits are clear. The gradient is a straight line between two colours, with no third colour for the midtones and no control over the curve. The blend is worked out on the stored colour values, as design tools do, not in a perceptual colour space, so some pairs pass through a slightly greyer middle. A transparent PNG keeps its transparency. JPEG is saved again at high quality, HEIC comes out as PNG, and the largest image the tool takes is 24 megapixels.