<?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: Converting and formatting colors</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tomas</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/comment-page-1/#comment-568</link>
		<dc:creator>Tomas</dc:creator>
		<pubDate>Fri, 09 Jan 2009 18:54:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-568</guid>
		<description>Thanks for the example. A very simple way to convert a string color to uint.</description>
		<content:encoded><![CDATA[<p>Thanks for the example. A very simple way to convert a string color to uint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/comment-page-1/#comment-567</link>
		<dc:creator>Christoph</dc:creator>
		<pubDate>Wed, 20 Feb 2008 13:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-567</guid>
		<description>Hi,

is there any way to set the selectedColor-property from a value fed in from an XML (=HTTPservice)? Tried with this,





and



but this just keeps me giving an error.

Thanks for your help!

Christoph</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>is there any way to set the selectedColor-property from a value fed in from an XML (=HTTPservice)? Tried with this,</p>
<p>and</p>
<p>but this just keeps me giving an error.</p>
<p>Thanks for your help!</p>
<p>Christoph</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilles TASSE</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/comment-page-1/#comment-566</link>
		<dc:creator>Gilles TASSE</dc:creator>
		<pubDate>Wed, 24 Oct 2007 10:10:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-566</guid>
		<description>This is very good example.</description>
		<content:encoded><![CDATA[<p>This is very good example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/comment-page-1/#comment-565</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 14 Aug 2007 06:40:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-565</guid>
		<description>Here are a few more methods:

&lt;pre class=&quot;code&quot;&gt;
/* Convert r/g/b values (255,0,255) to a fixed string (&#039;FF00FF&#039;). */
private function rgbToStr(r:int, g:int, b:int):String {
    return fixedInt(rgbToInt(r, g, b), &quot;000000&quot;);
}

/* Convert a string (&#039;0xFF00FF&#039;) to an integer (16711935). */
private function strToInt(value:String):int {
    return int(value);
}

/* Convert a string (&#039;0xFF00FF&#039;) to an object containing an &#039;r&#039;, &#039;g&#039;, and &#039;b&#039; property. */
private function strToRGB(value:String):Object {
    var temp:int = strToInt(value);
    return {r:rChannel(temp), g:gChannel(temp), b:bChannel(temp)};
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Here are a few more methods:</p>
<pre class="code">
/* Convert r/g/b values (255,0,255) to a fixed string ('FF00FF'). */
private function rgbToStr(r:int, g:int, b:int):String {
    return fixedInt(rgbToInt(r, g, b), "000000");
}

/* Convert a string ('0xFF00FF') to an integer (16711935). */
private function strToInt(value:String):int {
    return int(value);
}

/* Convert a string ('0xFF00FF') to an object containing an 'r', 'g', and 'b' property. */
private function strToRGB(value:String):Object {
    var temp:int = strToInt(value);
    return {r:rChannel(temp), g:gChannel(temp), b:bChannel(temp)};
}
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>

