<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IxD Consultant &#187; RGB</title>
	<atom:link href="http://ixd-consultant.com/blog/tag/rgb/feed/" rel="self" type="application/rss+xml" />
	<link>http://ixd-consultant.com/blog</link>
	<description>UX, AS, Thoughts</description>
	<lastBuildDate>Mon, 12 Jul 2010 21:00:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>RGB to Hexadecimal in ActionScript</title>
		<link>http://ixd-consultant.com/blog/2008/09/18/rgb-to-hexadecimal-in-actionscript/</link>
		<comments>http://ixd-consultant.com/blog/2008/09/18/rgb-to-hexadecimal-in-actionscript/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 23:31:34 +0000</pubDate>
		<dc:creator>xVisage</dc:creator>
				<category><![CDATA[2008]]></category>
		<category><![CDATA[September]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Hexadecimal]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://interactive-developer.com/blog/?p=74</guid>
		<description><![CDATA[The following method simply converts a given RGB value to hexadecimal format.. i.e. 0 > #000000 public function getProperColor&#40;input:int&#41;:String &#123; var color:String = &#34;#&#34;; var checker:Number = 0; if &#40;input.toString&#40;16&#41;.length&#60;6&#41; &#123; while &#40;checker&#60;6-input.toString&#40;16&#41;.length&#41; &#123; color += &#34;0&#34;; checker++; &#125; &#125; color += input.toString&#40;16&#41;; return color; &#125;]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_light-green" style="float: right; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fixd-consultant.com%252Fblog%252F2008%252F09%252F18%252Frgb-to-hexadecimal-in-actionscript%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FaQrz0q%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22RGB%20to%20Hexadecimal%20in%20ActionScript%22%20%7D);"></div>
<p>The following method simply converts a given RGB value to hexadecimal format..<br />
i.e. 0 > #000000</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> getProperColor<span style="color: #000000;">&#40;</span>input<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">color</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;#&quot;</span>;
	<span style="color: #6699cc; font-weight: bold;">var</span> checker<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span>;
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>input.<span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">16</span><span style="color: #000000;">&#41;</span>.length<span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;">6</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>checker<span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;">6</span><span style="color: #000000; font-weight: bold;">-</span>input.<span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">16</span><span style="color: #000000;">&#41;</span>.<span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">color</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;0&quot;</span>;
			checker<span style="color: #000000; font-weight: bold;">++</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #004993;">color</span> <span style="color: #000000; font-weight: bold;">+</span>= input.<span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">16</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">color</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<div class="fblike_button" style="position:absolute; padding-top:3px;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fixd-consultant.com%2Fblog%2F2008%2F09%2F18%2Frgb-to-hexadecimal-in-actionscript%2F&amp;layout=standard&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:25px"></iframe></div>

]]></content:encoded>
			<wfw:commentRss>http://ixd-consultant.com/blog/2008/09/18/rgb-to-hexadecimal-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
