<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Convert string to Color</title>
	<atom:link href="http://www.85turns.com/2009/07/24/convert-string-to-color/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.85turns.com/2009/07/24/convert-string-to-color/</link>
	<description>Silverlight Consultant</description>
	<lastBuildDate>Wed, 19 Jan 2011 12:35:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: John M</title>
		<link>http://www.85turns.com/2009/07/24/convert-string-to-color/comment-page-1/#comment-954</link>
		<dc:creator>John M</dc:creator>
		<pubDate>Sat, 05 Sep 2009 17:00:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.85turns.com/2009/07/24/convert-string-to-color/#comment-954</guid>
		<description>Thanks this was perfect..nice and simple</description>
		<content:encoded><![CDATA[<p>Thanks this was perfect..nice and simple</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop &#8211; Weekend Edition &#8211; July 25-26, 2009 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://www.85turns.com/2009/07/24/convert-string-to-color/comment-page-1/#comment-907</link>
		<dc:creator>Dew Drop &#8211; Weekend Edition &#8211; July 25-26, 2009 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Sun, 26 Jul 2009 15:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.85turns.com/2009/07/24/convert-string-to-color/#comment-907</guid>
		<description>[...] Convert string to Color (Corey Schuman) [...]</description>
		<content:encoded><![CDATA[<p>[...] Convert string to Color (Corey Schuman) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Vogt</title>
		<link>http://www.85turns.com/2009/07/24/convert-string-to-color/comment-page-1/#comment-904</link>
		<dc:creator>Daniel Vogt</dc:creator>
		<pubDate>Sat, 25 Jul 2009 09:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.85turns.com/2009/07/24/convert-string-to-color/#comment-904</guid>
		<description>Sorry, but there is no possability for &quot;code design&quot;. :(</description>
		<content:encoded><![CDATA[<p>Sorry, but there is no possability for &#8220;code design&#8221;. <img src='http://www.85turns.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Vogt</title>
		<link>http://www.85turns.com/2009/07/24/convert-string-to-color/comment-page-1/#comment-903</link>
		<dc:creator>Daniel Vogt</dc:creator>
		<pubDate>Sat, 25 Jul 2009 09:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.85turns.com/2009/07/24/convert-string-to-color/#comment-903</guid>
		<description>I would like&#160;to have a bearing on the alpha value. So &lt;a href=&quot;http://www.dict.cc/englisch-deutsch/have.html&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.dict.cc/englisch-deutsch/a.html&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.dict.cc/englisch-deutsch/bearing.html&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.dict.cc/englisch-deutsch/on.html&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;I changed the method. With that I can use the following syntax:myObject.Foreground = ParseColor(&quot;#AAFF0000&quot;);Here is the changed method:public static Color ParseColor(string value) {&#160;&#160;&#160; value = value.Replace(&quot;#&quot;, &quot;&quot;);&#160; &#160; Int32 v = Int32.Parse(value, System.Globalization.NumberStyles.HexNumber);&#160; &#160; return new Color() {&#160; &#160; &#160; &#160; A = Convert.ToByte((v &gt;&gt; 32) &amp; 255),&#160;&#160; &#160; &#160;&#160; R = Convert.ToByte((v &gt;&gt; 16) &amp; 255),&#160; &#160; &#160; &#160; G = Convert.ToByte((v &gt;&gt; 8) &amp; 255),&#160;&#160;&#160;&#160;&#160;&#160;&#160; B = Convert.ToByte((v &gt;&gt; 0) &amp; 255),&#160;&#160;&#160;&#160; };}</description>
		<content:encoded><![CDATA[<p>I would like&nbsp;to have a bearing on the alpha value. So <a href="http://www.dict.cc/englisch-deutsch/have.html" rel="nofollow"></a><a href="http://www.dict.cc/englisch-deutsch/a.html" rel="nofollow"></a><a href="http://www.dict.cc/englisch-deutsch/bearing.html" rel="nofollow"></a><a href="http://www.dict.cc/englisch-deutsch/on.html" rel="nofollow"></a>I changed the method. With that I can use the following syntax:myObject.Foreground = ParseColor(&#8220;#AAFF0000&#8243;);Here is the changed method:public static Color ParseColor(string value) {&nbsp;&nbsp;&nbsp; value = value.Replace(&#8220;#&#8221;, &#8220;&#8221;);&nbsp; &nbsp; Int32 v = Int32.Parse(value, System.Globalization.NumberStyles.HexNumber);&nbsp; &nbsp; return new Color() {&nbsp; &nbsp; &nbsp; &nbsp; A = Convert.ToByte((v &gt;&gt; 32) &amp; 255),&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; R = Convert.ToByte((v &gt;&gt; 16) &amp; 255),&nbsp; &nbsp; &nbsp; &nbsp; G = Convert.ToByte((v &gt;&gt; <img src='http://www.85turns.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> &amp; 255),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B = Convert.ToByte((v &gt;&gt; 0) &amp; 255),&nbsp;&nbsp;&nbsp;&nbsp; };}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

