I want to put a red rectangular <div>
element over my webpage so that it would look not only transparent, but also like blended in Photoshop’s Multiply mode.
The <div>
would have position: fixed
, so the content below it would change quickly.
Is that possible with any HTML5 / CSS3 / canvas / SVG trick?
The five blend modes we'll be learning In this tutorial, we'll focus on Photoshop's five most important blend modes, which are Multiply, Screen, Overlay, Color, and Luminosity. Even though Photoshop includes 22 others, these five blend modes are the ones you'll use the most.
Specify a blending mode for a layer Select a layer that you have added, in the Layers panel. Choose an option from the Blending Mode menu. Note: (Windows) Immediately after you choose a blending mode, you can press the up or down arrows on your keyboard to try other blending mode options in the menu.
Hue, Saturation, Luminosity or a combination of these. Photoshop Blending Modes can be easy to understand if you simplify the whole process.
I have created a separate, lightweight, open-source library for perform Photoshop-style blend modes from one HTML Canvas context to another: context-blender. Here's the sample usage:
// Might be an 'offscreen' canvas var over = someCanvas.getContext('2d'); var under = anotherCanvas.getContext('2d'); over.blendOnto( under, 'screen', {destX:30,destY:15} );
See the README for more information, including the currently-supported blend modes.
You could use this to perform multiply from one canvas to another, but not over standard HTML elements.
No (not natively) but it's coming soon: http://blogs.adobe.com/webplatform/2012/04/04/bringing-blending-to-the-web/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With