Duotone / recolor
Map an image onto two colours by luminance, on your device.
Runs on your device. The file is never uploaded.
Duotone / recolor reduces every pixel to one luminance value with the 0.299, 0.587 and 0.114 weights, then places it on the straight line between your two hex colours. The defaults, #000000 and #ffffff, are a plain black to white ramp. Hue is thrown away before the mapping, so two colours of equal brightness come out identical.
Questions
How does the duotone mapping work?
Each pixel is reduced to a single brightness value using the standard luminance weights, 0.299 red, 0.587 green and 0.114 blue, then that value picks a point on the straight line between your two colours. Pure black areas become the Colour for dark tones, pure white becomes the Colour for light tones, and everything else lands in between. Original hues are discarded entirely.
Why did my image come back grayscale?
Because the defaults are #000000 for shadows and #ffffff for highlights, which is exactly a black to white ramp. Change one or both to see a real duotone, for example #1a1a4d and #ffcc00. Both fields take six hex digits, with or without the leading hash; anything else is refused with a message beginning "invalid colour".
Is transparency preserved?
Yes. Only red, green and blue are rewritten; the alpha of every pixel is copied straight across. A PNG with a transparent background comes back with the same transparent background. The output keeps your input format too, so a PNG stays a PNG and a JPG stays a JPG, encoded at the Quality option, default 80.
Does anything get uploaded?
No. The image is decoded with the jSquash WebAssembly codecs in a Web Worker, remapped pixel by pixel on your device, and encoded there. There is no upload, no account and no server step, and the page keeps working offline after your first visit.
What is the output called?
Your name with a -duotone suffix and the original extension, such as cover-duotone.jpg. JPG, PNG and WebP inputs are accepted, matched on the file extension; anything else stops with "only JPG, PNG and WebP are supported". Drop a batch and every file gets the same two colours.