<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Use the entities. E.g. replace #ffffff with &stroke_color;</div><div><br></div><div>Just look at the source of any activity icon.</div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><br class="Apple-interchange-newline"></span></div></div><br><div><div>On 23.08.2010, at 22:03, Erik Blankinship wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta charset="utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">rephrased: How would I specify that I want sugar to use an XO color to create a gradient when my activity is running?</span><br>
<br><div class="gmail_quote">On Mon, Aug 23, 2010 at 3:46 PM, Erik Blankinship <span dir="ltr"><<a href="mailto:erikb@mediamods.com">erikb@mediamods.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><br></blockquote><br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Aug 23, 2010 at 3:14 PM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">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>On Mon, Aug 23, 2010 at 1:52 PM, Erik Blankinship <<a href="mailto:erikb@mediamods.com" target="_blank">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></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 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>
</blockquote></div><br>
_______________________________________________<br>Sugar-devel mailing list<br><a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>http://lists.sugarlabs.org/listinfo/sugar-devel<br></blockquote></div><br></body></html>