W3C home > Mailing lists > Public > www-svg@w3.org > March 2009

solidColor (was: Propositions for the next SVG spec)

From: Doug Schepers <schepers@w3.org>
Date: Mon, 16 Mar 2009 13:18:18 -0400
Message-ID: <49BE89DA.7000806@w3.org>
To: www-svg@w3.org
Hi, Jeff-

Jeff Schiller wrote (on 3/16/09 9:15 AM):
> On 3/16/09, St├ęphane Daviet<stephane.daviet@gmail.com>  wrote:
>>  First, SVG is XML, so it would be great to be able to get some CSS like
>>  mechanisms to simply change the appearance (colors for instance) of a file.
>>  I would also be great to be able to declare some colors externaly and reuse
>>  them as constants.
> Paint Servers: http://www.w3.org/TR/SVGTiny12/painting.html#PaintServers
> file1.svg:
> <svg ...>
>    <defs>
>      <solidColor id="fooColor" solid-color="#4488aa" />
>    </defs>
> </svg>
> file2.svg:
> <svg ...>
>    <rect fill="url(file1.svg#fooColor)" ... />
> </svg>

Yes, <solidColor> seems to fit the bill there (if I understand his use 

FWIW, since Opera is the only one of the desktop browsers that supports 
<solidColor> (yay, Opera!), I often use a hack to achieve a similar 
effect, which is to use a one-stop gradient (either linear or radial, 
doesn't matter) with the desired color.  It should be pretty trivial for 
the other browsers to support <solidColor> down the road.

-Doug Schepers
W3C Team Contact, SVG and WebApps WGs
Received on Monday, 16 March 2009 17:18:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:16 UTC