Say you have a black & white image and want to display it in many different 2-color schemes.



You have a few options here. You could draw the image in a canvas and then use JavaScript to manipulate each pixel. Or you could in theory convert your black & white image to SVG and then use CSS to manipulate the colors. That’s probably a pretty decent solution.
Or you could use the new duotone CSS custom filter I’ve built. You can find the source for the new filter on Github here. (more…)






