This visual filter inverts the color value of every pixel in the filtered element.
There are several color models that could be used for this. The display is based around the RGB model and a printout would use the CMY or CMYK model. Inverting either of these would yield a different effect.
So, the browser will invert the colors using the HSV model. This should work consistently across all display mediums.
HSV stands for Hue, Saturation and Value (which means brightness or luminosity in most cases).
The Hue value is represented by a color wheel where the colors are specified on an angular basis from 0 to 360 degrees. Opposite sides of the wheel yield complementary colors.
The Saturation value defines the amount of color. No color at all yields a purely grayscale appearance.
The Value or lightness axis defines how bright the pixel is.
So inverting a pixel using HSV will perform these operations on discrete components of the color value:-
Switch the color to one that is 180 degrees round the color wheel.
Complement the saturation value. Unsaturated pixels become saturated and vice versa.
Lightness is complemented making dark pixels light and vice versa.
Using this model to invert the pixels in an element should make it stand out clearly against a background.
There are no properties defined for this filter at present.
The use of this filter is now deprecated in favor of the BasicImage() filter that was implemented with the IE 5.5 browser.
Filters are defined in style sheets as if they were a function call with its arguments expressed as name=value pairs. This is not the typical way to define arguments so you should be aware of this anomaly when working with filters.
See also: | filter - BasicImage(), Filter object, style.filter |
Prev | Home | Next |
filter - Inset() | Up | filter - Iris() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |