W3C home > Mailing lists > Public > www-svg@w3.org > November 2005

Re: [SVGMobile12] Interaction of rgba() and -opacity="" should be defined

From: Dean Jackson <dino@w3.org>
Date: Thu, 3 Nov 2005 03:07:42 +1100
Message-Id: <FF376C6A-55EC-4043-B42A-54EF56719D6F@w3.org>
Cc: www-svg@w3.org
To: Ian Hickson <ian@hixie.ch>

On 20/05/2005, at 11:52 PM, Ian Hickson wrote:

> The CSS 'color' property can include a fractional opacity component  
> (in
> CSS3), as can the values of the CSS2 system colors (in CSS2).
> Since the 'color' property is referencable from SVG (via  
> currentColor),
> and since SVG allows the CSS2 system colors on its attributes, and  
> also
> since when SVG is implemented in a CSS3 UA the <color>-capable  
> properties
> will also take rgba(), etc, please define how a colour with an alpha
> component must be handled when used where SVG explicitly gives a  
> related
> -opacity property.
> I can see several options:
>  * drop the alpha on the color, use only the -opacity.
>  * drop the -opacity, use only the alpha, unless the alpha is 1.0.
>  * combine the alpha and the -opacity in some defined way.
> The latter would be my recommendation.

Good, because there is a well-known method for combining opacities used
in the SVG specification, and your first two options are unacceptable.
We'll take option 3.

I've updated the spec to include explicit description of behaviour in
this situation:

Compositing the currentColor value
The currentColor property may be assigned a color value that
has an opacity component. This opacity value is used in the
rendering operation using the alpha compositing method described
above.(*) That is, the opacity value in currentColor is used when
compositing the color into a paint server (which may
have its own values for opacity).

(*) This section goes directly after Simple Alpha Compositing
in the painting chapter.

Received on Wednesday, 2 November 2005 16:07:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:08 UTC