This article will go over how you will be able to specify blending in your web pages alongside some code examples.

Since we proposed the feature, we’ve received great feedback from the developer and designer communities. They are very familiar with the feature and immediately saw how they can use it to make interesting content.

We drafted a proposal with Canon that describes a couple of simple additions to CSS to add blending to the browser’s rendering model. The specification has been presented to the W3C FX task force as well as the SVG and the CSS working groups. We are going to follow the W3C recommendation track which will result in widespread adoption by the browser vendors.

One feature that has been available a long time in graphical tools but not the web is blending. Blending is supported across most graphical design tools and used very often. There are many books on the subject and countless tutorials on the web with tricks and tips to create interesting effects. They are supported in formats like PDF and in tools such as Photoshop. We feel that it makes sense to bring them to the HTML world as well.

The Adobe Web Platform team is working on pushing forward what is possible on the web in terms of layout, typography and visual effects. We work together with the W3C , browser vendors and others on specifying and implementing things like advanced typography magazine style layouts and more.

Take for instance the following example of two images that are combined with no blending (Figure 1):

For those of you who are not familiar with the concept, blending determines how a layer can inherit color from the elements that are underneath. At the basic level, you take the color of your element and you mix it with the color that is behind the element. The name of the blend mode specifies the mathematical formula that does the ‘mixing’.

As you can see there is no interaction between the two images.

If you’re interested how people use this feature to create some amazing artwork, do a web search for ‘Photoshop blending tutorial’ and you will find many articles and YouTube videos.

Notice how the colors of the sun are recalculated so the darkness and lightness of the background image are preserved.

<h2>texturing and blending</h2> <ul id="textured-menu"> <li>Home</li> <li>About</li> <li>Products</li> </ul>

#textured-menu li { width: 200px; height: 200px; padding-top: 65px; text-align: center; border-radius: 100px; margin: 10px; … }

Now we have three buttons on a web page. We like their shape but would really like the texture of the background to come through since that will give a more interesting effect.

In today’s world, you have to create an image in program like Photoshop to mimic this effect. Major drawbacks to this approach are increased download time for the user and higher maintenance cost for the client since you would have to redesign this every time there is a change. Also, if the images are resized because of a small screen, the text and outline will become pixelated.