• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. Filters > The feComponentTransfer Filter

The feComponentTransfer Filter

The problem with the background is that it is too dark. Using saturate isn’t the answer; it raises or lowers all the color levels. What we need to do is increase the level of green and red more than the blue level, and the <feComponentTransfer> element lets us do just that.

You adjust the levels of red, green, blue, and alpha by placing a <feFuncR>, <feFuncG>, <feFuncB>, and <feFuncA> element inside the <feComponentTransfer>. Each of these sub-elements may independently specify a type attribute that tells how that particular channel is to be modified.

To simulate the effect of a brightness control, you specify the linear function, which places the current color value C into the formula: slope  *  C +  intercept. The intercept provides a “base value” for the result; the slope is a simple scaling factor. Example 10-5 uses a filter that adds a brightened sky to the flower with the drop shadow. Note that the red and green channels are adjusted differently than the blue channel. This dramatically brightens the sky in Figure 10-10.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint