<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><br></blockquote><br><div class="gmail_quote">On Mon, Aug 23, 2010 at 3:14 PM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com">walter.bender@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Mon, Aug 23, 2010 at 1:52 PM, Erik Blankinship <<a href="mailto:erikb@mediamods.com">erikb@mediamods.com</a>> wrote:<br>
> When I launch an activity, the SVG icon used to display my activity changes<br>
> appearance by rendering with the XO colors.<br>
> (1) Is there a way to render gradients using the fill color? For example,<br>
> if the child's XO fill color is red, I would like to render an activity icon<br>
> using a red gradient. Maybe there are tricks in SVG which make this<br>
> possible?<br>
<br>
</div>SVG does have a gradient you can use. I use them in the Turtle Art<br>
blocks. For example,<br>
<br>
<defs><br>
<linearGradient id="linearGradient1234"><br>
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" /><br>
<stop style="stop-color:#000000;stop-opacity:1;" offset="1" /><br>
</linearGradient><br>
<linearGradient<br>
xlink:href="#linearGradient1234"<br>
id="linearGradient5678"<br>
x1="0"<br>
y1="100 "<br>
x2="200"<br>
y2="300"<br>
gradientUnits="userSpaceOnUse" /><br>
</defs><br>
<br>
later,<br>
<br>
fill = "url(#linearGradient5678)"<br><br></blockquote><div><br></div><div>Thank you, it is helpful to see how gradients can be used in SVG. </div><div><br></div><div>How would I specify that I want to sugar to use the XO color to create a gradient from the XO fill color when my activity is running? As I understand it, sugar activity icons can expect stroke_color and fill_color to be provided when an activity is launched:</div>
<div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div class="gmail_quote"><div><!ENTITY stroke_color "#010101"></div></div><div class="gmail_quote">
<div><!ENTITY fill_color "#FFFFFF"></div><div><br></div></div></blockquote>Given one of these colors, it would like to calculate the stop-colors in your example.<div><br></div><div>Can I do this calculation in SVG? Can my activity somehow pass this information to the SVG renderer when it is launched?</div>