W3C home > Mailing lists > Public > www-svg@w3.org > October 2011

Re: feColorMatrix type="saturate"

From: Dirk Schulze <vbs85@gmx.de>
Date: Sun, 2 Oct 2011 08:37:38 +0200
Cc: "Chris Lilley" <chris@w3.org>, www-svg@w3.org
Message-Id: <CADADDDF-FF94-4FBD-9CAB-8A1A4064F3DB@gmx.de>
To: Erik Dahlstrom <ed@opera.com>
> 
> I've just made that change in the Filter Effects draft:
> 
>    http://dvcs.w3.org/hg/FXTF/raw-file/3f1fdd4a8004/filters/publish/Filters.html#feColorMatrixElement

Just for clarification: If the values are outside the range of 0..1, we can get color values outside the range of 0..255. I assume the color value should be set to 0 if new value < 0 and set to 255 if new color value > 255.

An example for the red channel, a saturation of 4 and the color rgb(255, 0, 255):

(0.2127 + 0.7873 * 4) * 255 + (0.7152 - 0.7152 * 4) * 0 + (0.0722 - 0.0722 * 4) * 255 = 802.0515

Dirk
Received on Sunday, 2 October 2011 06:38:09 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:49 GMT