<?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>jason sturges</title>
	<atom:link href="http://www.jasonsturges.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonsturges.com</link>
	<description>avant-garde</description>
	<lastBuildDate>Mon, 09 Aug 2010 05:08:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Perlin Noise</title>
		<link>http://www.jasonsturges.com/2010/08/08/perlin-noise/</link>
		<comments>http://www.jasonsturges.com/2010/08/08/perlin-noise/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 05:08:40 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blitting]]></category>
		<category><![CDATA[noise]]></category>
		<category><![CDATA[perlin]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=230</guid>
		<description><![CDATA[Perlin Noise is another example of how random generation can yield an expected result unique to each instance implemented. Code for the above example: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Wikipedia Perlin Noise" href="http://en.wikipedia.org/wiki/Perlin_noise">Perlin Noise</a> is another example of how random generation can yield an expected result unique to each instance implemented.</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/perlin-noise.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/perlin-noise.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p><span id="more-230"></span></p>
<p>Code for the above example:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_PerlinNoise</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 8/9/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapData</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Point</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">backgroundColor</span>=0xefefef, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_PerlinNoise <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _bitmap:Bitmap;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _bitmapData:BitmapData;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _angle:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _channels:uint = <span style="color: #cc66cc;">7</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _points:<span style="color: #0066CC;">Array</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _seed:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">500</span> + <span style="color: #cc66cc;">500</span>;
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_PerlinNoise<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			_bitmapData = <span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">300</span>, <span style="color: #000000; font-weight: bold;">true</span>, 0xffffff<span style="color: #66cc66;">&#41;</span>;
			_bitmap = <span style="color: #000000; font-weight: bold;">new</span> Bitmap<span style="color: #66cc66;">&#40;</span>_bitmapData<span style="color: #66cc66;">&#41;</span>;
			_bitmap.<span style="color: #0066CC;">smoothing</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			addChild<span style="color: #66cc66;">&#40;</span>_bitmap<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_points = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.7</span>, -<span style="color: #cc66cc;">0.7</span><span style="color: #66cc66;">&#41;</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.9</span>, -<span style="color: #cc66cc;">0.9</span><span style="color: #66cc66;">&#41;</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">17</span>, -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1.3</span>, -<span style="color: #cc66cc;">2.7</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, frameHandler<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> frameHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">x</span> += <span style="color: #cc66cc;">5</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">y</span> -= <span style="color: #cc66cc;">5</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">x</span> += <span style="color: #cc66cc;">0.9</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">y</span> -= <span style="color: #cc66cc;">0.9</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">x</span> += <span style="color: #cc66cc;">4</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">y</span> -= <span style="color: #cc66cc;">5</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">x</span> += <span style="color: #cc66cc;">9</span>;
			_points<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">y</span> -= <span style="color: #cc66cc;">3</span>;
&nbsp;
			_bitmapData.<span style="color: #006600;">perlinNoise</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">150</span>, <span style="color: #cc66cc;">4</span>, _seed, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">true</span>, _channels, <span style="color: #000000; font-weight: bold;">false</span>, _points<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/08/08/perlin-noise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sierpinski Triangle case study &#8211; setting pixels with bitmap data</title>
		<link>http://www.jasonsturges.com/2010/08/08/sierpinski-triangle-case-study-setting-pixels-with-bitmap-data/</link>
		<comments>http://www.jasonsturges.com/2010/08/08/sierpinski-triangle-case-study-setting-pixels-with-bitmap-data/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 04:37:59 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[chaos theory]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=224</guid>
		<description><![CDATA[Continuing on this random trend, from chaos comes order as we start to approach blitting with bitmap data. Chaos Theory is a good corollary to the philosophy of the Blitting SDK. By defining the behavior of systems, we can obtain an expected result with some threshold unique to each instance. To model this, a case [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on this random trend, from chaos comes order as we start to approach blitting with bitmap data.</p>
<p><a title="Wikipedia Chaos Theory" href="http://en.wikipedia.org/wiki/Chaos_theory">Chaos Theory</a> is a good corollary to the philosophy of the Blitting SDK.  By defining the behavior of systems, we can obtain an expected result with some threshold unique to each instance.</p>
<p>To model this, a case study of <a title="Wikipedia Sierpinski's Triangle" href="http://en.wikipedia.org/wiki/Sierpinski_triangle">Sierpinski&#8217;s Triangle</a> is used:</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/sierpinski-triangle.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/sierpinski-triangle.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p><span id="more-224"></span></p>
<p>With bitmap data, pixels may be directly manipulated.</p>
<p>In this implementation, setPixel32 is executed against the viewport&#8217;s BitmapData to colorize a pixel.</p>
<p>Code for this implementation (found within the blitting-apps project):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_SierpinskiTriangle</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 8/2/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapData</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Point</span>;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">backgroundColor</span>=0xefefef, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_SierpinskiTriangle <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Current point. */</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> _point:Point;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Points of triangle, established on resize. */</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> _triangle:Vector.<span style="color: #66cc66;">&lt;</span>Point<span style="color: #66cc66;">&gt;</span>;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Per frame number of points to be drawn. */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> iterations:uint = <span style="color: #cc66cc;">100</span>;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Bitmap. */</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> _bitmap:Bitmap;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Bitmap data. */</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> _bitmapData:BitmapData;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** constructor */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_SierpinskiTriangle<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** On added to stage handler. */</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, enterFrameHandler<span style="color: #66cc66;">&#41;</span>;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">REMOVED_FROM_STAGE</span>, removedFromStageHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_bitmapData = <span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span>, <span style="color: #000000; font-weight: bold;">true</span>, 0xff0000<span style="color: #66cc66;">&#41;</span>;
			_bitmap = <span style="color: #000000; font-weight: bold;">new</span> Bitmap<span style="color: #66cc66;">&#40;</span>_bitmapData<span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>_bitmap<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_triangle = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&lt;</span>Point<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_triangle.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			_triangle.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.5</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			_triangle.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** 
		 * Handler for on enter frame, responsible for 
		 * drawing points within the triangle.
		 */</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> enterFrameHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> it:uint = <span style="color: #cc66cc;">0</span>; it <span style="color: #66cc66;">&lt;</span> iterations; it++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// chose a point (ordinal, 0-2)</span>
				<span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">floor</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> p:Point = _triangle<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
&nbsp;
				<span style="color: #808080; font-style: italic;">// move halfway towards that point.</span>
				_point.<span style="color: #006600;">x</span> = _point.<span style="color: #006600;">x</span> + <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>p.<span style="color: #006600;">x</span> - _point.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.5</span><span style="color: #66cc66;">&#41;</span>;
				_point.<span style="color: #006600;">y</span> = _point.<span style="color: #006600;">y</span> + <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>p.<span style="color: #006600;">y</span> - _point.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.5</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				<span style="color: #808080; font-style: italic;">// base color upon the point</span>
				<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:uint = 0xff000000;
				<span style="color: #b1b100;">switch</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">0</span>: <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">color</span> = 0xffff0000; <span style="color: #b1b100;">break</span>; <span style="color: #66cc66;">&#125;</span>
					<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span>: <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">color</span> = 0xff00ff00; <span style="color: #b1b100;">break</span>; <span style="color: #66cc66;">&#125;</span>
					<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span>: <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">color</span> = 0xff0000ff; <span style="color: #b1b100;">break</span>; <span style="color: #66cc66;">&#125;</span>
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				<span style="color: #808080; font-style: italic;">// draw pixel</span>
				_bitmapData.<span style="color: #006600;">setPixel32</span><span style="color: #66cc66;">&#40;</span>_point.<span style="color: #006600;">x</span>, _point.<span style="color: #006600;">y</span>, <span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** On removed from stage handler. */</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> removedFromStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, enterFrameHandler<span style="color: #66cc66;">&#41;</span>;
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">REMOVED_FROM_STAGE</span>, removedFromStageHandler<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/08/08/sierpinski-triangle-case-study-setting-pixels-with-bitmap-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random color visualization</title>
		<link>http://www.jasonsturges.com/2010/07/30/random-color-visualization/</link>
		<comments>http://www.jasonsturges.com/2010/07/30/random-color-visualization/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 04:42:45 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=149</guid>
		<description><![CDATA[Using the visualization code from the previous post, let&#8217;s apply a verification of RandomColor and Color classes for unit testing. In the following three examples, 50, 500, and 5000 colors are generated with each distribution of color graphed in a separate visualization. RandomColor generates random color values, Color gets RGB values, and a Timer provides [...]]]></description>
			<content:encoded><![CDATA[<p>Using the visualization code from the previous post, let&#8217;s apply a verification of RandomColor and Color classes for unit testing.</p>
<p>In the following three examples, 50, 500, and 5000 colors are generated with each distribution of color graphed in a separate visualization.</p>
<p>RandomColor generates random color values, Color gets RGB values, and a Timer provides animation to visualize examples over time.</p>
<p>
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/random-color-50.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/random-color-50.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/random-color-500.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/random-color-500.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/random-color-5000.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/random-color-5000.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object>
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_RandomColor</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #0066CC;">Color</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">ColorPalette</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">RandomColor</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Graphics</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">280</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">280</span>, <span style="color: #0066CC;">backgroundColor</span>=0xffffff, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_RandomColor <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> palette:Sprite;
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_RandomColor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			palette = graphPalette<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">256</span>, <span style="color: #cc66cc;">256</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> t:Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">&#41;</span>;
			t.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					palette = graphPalette<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">256</span>, <span style="color: #cc66cc;">256</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			t.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> graphPalette<span style="color: #66cc66;">&#40;</span>w:<span style="color: #0066CC;">Number</span>, h:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:Sprite
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>palette <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
				removeChild<span style="color: #66cc66;">&#40;</span>palette<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			palette = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>palette<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			palette.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">12</span>;
			palette.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">12</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> g:Graphics = palette.<span style="color: #006600;">graphics</span>;
			g.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> rows:uint = <span style="color: #cc66cc;">8</span>;
			<span style="color: #000000; font-weight: bold;">var</span> dx:uint = <span style="color: #cc66cc;">0</span>;
			<span style="color: #000000; font-weight: bold;">var</span> dy:uint = <span style="color: #cc66cc;">0</span>;
&nbsp;
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">5000</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:uint = RandomColor.<span style="color: #006600;">any</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				<span style="color: #000000; font-weight: bold;">var</span> red:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getRed</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> green:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getGreen</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> blue:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getBlue</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				g.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>, <span style="color: #cc66cc;">0.5</span><span style="color: #66cc66;">&#41;</span>;
				g.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				dy = w <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>red <span style="color: #66cc66;">/</span> 0xff<span style="color: #66cc66;">&#41;</span>;
				dx = h <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>blue <span style="color: #66cc66;">/</span> 0xff<span style="color: #66cc66;">&#41;</span>;
				g.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span>dx, dy, <span style="color: #66cc66;">&#40;</span>w <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.03</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>green <span style="color: #66cc66;">/</span> 0xff<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				g.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>palette<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/30/random-color-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RGB color palette</title>
		<link>http://www.jasonsturges.com/2010/07/30/rgb-color-palette/</link>
		<comments>http://www.jasonsturges.com/2010/07/30/rgb-color-palette/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 21:33:17 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[color]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=197</guid>
		<description><![CDATA[For reference, source of Blitting&#8217;s ColorPalette class: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [...]]]></description>
			<content:encoded><![CDATA[<p>For reference, source of Blitting&#8217;s ColorPalette class:<br />
<span id="more-197"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  ColorPalette</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting.color</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>
<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * &lt;p&gt;
	 * Enumeration of default X11 RGB X colors.&lt;br /&gt;
	 * &lt;/p&gt;
	 * &lt;p&gt;
	 * Use the static ColorPalette.Colors array of
	 * names for full enumeration.&lt;br /&gt;
	 * &lt;/p&gt;
	 * &lt;p&gt;
	 * Example:&lt;br /&gt;
	 * &lt;br /&gt;
	 * &lt;code&gt;
	 * for(var i:uint = 0; i &amp;lt; ColorPalette.Colors.length; i++)
	 * {
	 *    var color:uint = ColorPalette[ColorPalette.Colors[i]];
	 * }
	 * &lt;/code&gt;
	 *
	 * &lt;/p&gt;
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ColorPalette
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">//  all colors</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Array of all colors defined with the X11 RGB X color palette. */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const Colors:<span style="color: #0066CC;">Array</span> =
			<span style="color: #66cc66;">&#91;</span>
			<span style="color: #ff0000;">&quot;snow&quot;</span>,
			<span style="color: #ff0000;">&quot;ghostWhite&quot;</span>,
			<span style="color: #ff0000;">&quot;whiteSmoke&quot;</span>,
			<span style="color: #ff0000;">&quot;gainsboro&quot;</span>,
			<span style="color: #ff0000;">&quot;floralWhite&quot;</span>,
			<span style="color: #ff0000;">&quot;oldLace&quot;</span>,
			<span style="color: #ff0000;">&quot;linen&quot;</span>,
			<span style="color: #ff0000;">&quot;antiqueWhite&quot;</span>,
			<span style="color: #ff0000;">&quot;papayaWhip&quot;</span>,
			<span style="color: #ff0000;">&quot;blanchedAlmond&quot;</span>,
			<span style="color: #ff0000;">&quot;bisque&quot;</span>,
			<span style="color: #ff0000;">&quot;peachPuff&quot;</span>,
			<span style="color: #ff0000;">&quot;navajoWhite&quot;</span>,
			<span style="color: #ff0000;">&quot;moccasin&quot;</span>,
			<span style="color: #ff0000;">&quot;cornsilk&quot;</span>,
			<span style="color: #ff0000;">&quot;ivory&quot;</span>,
			<span style="color: #ff0000;">&quot;lemonChiffon&quot;</span>,
			<span style="color: #ff0000;">&quot;seashell&quot;</span>,
			<span style="color: #ff0000;">&quot;honeydew&quot;</span>,
			<span style="color: #ff0000;">&quot;mintCream&quot;</span>,
			<span style="color: #ff0000;">&quot;azure&quot;</span>,
			<span style="color: #ff0000;">&quot;aliceBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;lavender&quot;</span>,
			<span style="color: #ff0000;">&quot;lavenderBlush&quot;</span>,
			<span style="color: #ff0000;">&quot;mistyRose&quot;</span>,
			<span style="color: #ff0000;">&quot;white&quot;</span>,
			<span style="color: #ff0000;">&quot;black&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSlateGray&quot;</span>,
			<span style="color: #ff0000;">&quot;dimGrey&quot;</span>,
			<span style="color: #ff0000;">&quot;slateGray&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSlateGrey&quot;</span>,
			<span style="color: #ff0000;">&quot;gray&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGray&quot;</span>,
			<span style="color: #ff0000;">&quot;midnightBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;navy&quot;</span>,
			<span style="color: #ff0000;">&quot;navyBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;cornflowerBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSlateBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;slateBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumSlateBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSlateBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;royalBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;blue&quot;</span>,
			<span style="color: #ff0000;">&quot;dodgerBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;deepSkyBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;skyBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSkyBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;steelBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSteelBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;lightBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;powderBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;paleTurquoise&quot;</span>,
			<span style="color: #ff0000;">&quot;darkTurquoise&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumTurquoise&quot;</span>,
			<span style="color: #ff0000;">&quot;turquoise&quot;</span>,
			<span style="color: #ff0000;">&quot;cyan&quot;</span>,
			<span style="color: #ff0000;">&quot;lightCyan&quot;</span>,
			<span style="color: #ff0000;">&quot;cadetBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumAquamarine&quot;</span>,
			<span style="color: #ff0000;">&quot;aquamarine&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOliveGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSeaGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;seaGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumSeaGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSeaGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;paleGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;springGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;lawnGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;green&quot;</span>,
			<span style="color: #ff0000;">&quot;chartreuse&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumSpringGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;greenYellow&quot;</span>,
			<span style="color: #ff0000;">&quot;limeGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;yellowGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;forestGreen&quot;</span>,
			<span style="color: #ff0000;">&quot;oliveDrab&quot;</span>,
			<span style="color: #ff0000;">&quot;darkKhaki&quot;</span>,
			<span style="color: #ff0000;">&quot;khaki&quot;</span>,
			<span style="color: #ff0000;">&quot;paleGoldenrod&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGoldenrodYellow&quot;</span>,
			<span style="color: #ff0000;">&quot;lightYellow&quot;</span>,
			<span style="color: #ff0000;">&quot;yellow&quot;</span>,
			<span style="color: #ff0000;">&quot;gold&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGoldenrod&quot;</span>,
			<span style="color: #ff0000;">&quot;goldenrod&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGoldenrod&quot;</span>,
			<span style="color: #ff0000;">&quot;rosyBrown&quot;</span>,
			<span style="color: #ff0000;">&quot;indianRed&quot;</span>,
			<span style="color: #ff0000;">&quot;saddleBrown&quot;</span>,
			<span style="color: #ff0000;">&quot;sienna&quot;</span>,
			<span style="color: #ff0000;">&quot;peru&quot;</span>,
			<span style="color: #ff0000;">&quot;burlywood&quot;</span>,
			<span style="color: #ff0000;">&quot;beige&quot;</span>,
			<span style="color: #ff0000;">&quot;wheat&quot;</span>,
			<span style="color: #ff0000;">&quot;sandyBrown&quot;</span>,
			<span style="color: #ff0000;">&quot;tan&quot;</span>,
			<span style="color: #ff0000;">&quot;chocolate&quot;</span>,
			<span style="color: #ff0000;">&quot;firebrick&quot;</span>,
			<span style="color: #ff0000;">&quot;brown&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSalmon&quot;</span>,
			<span style="color: #ff0000;">&quot;salmon&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSalmon&quot;</span>,
			<span style="color: #ff0000;">&quot;orange&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrange&quot;</span>,
			<span style="color: #ff0000;">&quot;coral&quot;</span>,
			<span style="color: #ff0000;">&quot;lightCoral&quot;</span>,
			<span style="color: #ff0000;">&quot;tomato&quot;</span>,
			<span style="color: #ff0000;">&quot;orangeRed&quot;</span>,
			<span style="color: #ff0000;">&quot;red&quot;</span>,
			<span style="color: #ff0000;">&quot;hotPink&quot;</span>,
			<span style="color: #ff0000;">&quot;deepPink&quot;</span>,
			<span style="color: #ff0000;">&quot;pink&quot;</span>,
			<span style="color: #ff0000;">&quot;lightPink&quot;</span>,
			<span style="color: #ff0000;">&quot;paleVioletRed&quot;</span>,
			<span style="color: #ff0000;">&quot;maroon&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumVioletRed&quot;</span>,
			<span style="color: #ff0000;">&quot;violetRed&quot;</span>,
			<span style="color: #ff0000;">&quot;magenta&quot;</span>,
			<span style="color: #ff0000;">&quot;violet&quot;</span>,
			<span style="color: #ff0000;">&quot;plum&quot;</span>,
			<span style="color: #ff0000;">&quot;orchid&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumOrchid&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrchid&quot;</span>,
			<span style="color: #ff0000;">&quot;darkViolet&quot;</span>,
			<span style="color: #ff0000;">&quot;blueViolet&quot;</span>,
			<span style="color: #ff0000;">&quot;purple&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumPurple&quot;</span>,
			<span style="color: #ff0000;">&quot;thistle&quot;</span>,
			<span style="color: #ff0000;">&quot;snow1&quot;</span>,
			<span style="color: #ff0000;">&quot;snow2&quot;</span>,
			<span style="color: #ff0000;">&quot;snow3&quot;</span>,
			<span style="color: #ff0000;">&quot;snow4&quot;</span>,
			<span style="color: #ff0000;">&quot;seashell1&quot;</span>,
			<span style="color: #ff0000;">&quot;seashell2&quot;</span>,
			<span style="color: #ff0000;">&quot;seashell3&quot;</span>,
			<span style="color: #ff0000;">&quot;seashell4&quot;</span>,
			<span style="color: #ff0000;">&quot;antiqueWhite1&quot;</span>,
			<span style="color: #ff0000;">&quot;antiqueWhite2&quot;</span>,
			<span style="color: #ff0000;">&quot;antiqueWhite3&quot;</span>,
			<span style="color: #ff0000;">&quot;antiqueWhite4&quot;</span>,
			<span style="color: #ff0000;">&quot;bisque1&quot;</span>,
			<span style="color: #ff0000;">&quot;bisque2&quot;</span>,
			<span style="color: #ff0000;">&quot;bisque3&quot;</span>,
			<span style="color: #ff0000;">&quot;bisque4&quot;</span>,
			<span style="color: #ff0000;">&quot;peachPuff1&quot;</span>,
			<span style="color: #ff0000;">&quot;peachPuff2&quot;</span>,
			<span style="color: #ff0000;">&quot;peachPuff3&quot;</span>,
			<span style="color: #ff0000;">&quot;peachPuff4&quot;</span>,
			<span style="color: #ff0000;">&quot;navajoWhite1&quot;</span>,
			<span style="color: #ff0000;">&quot;navajoWhite2&quot;</span>,
			<span style="color: #ff0000;">&quot;navajoWhite3&quot;</span>,
			<span style="color: #ff0000;">&quot;navajoWhite4&quot;</span>,
			<span style="color: #ff0000;">&quot;lemonChiffon1&quot;</span>,
			<span style="color: #ff0000;">&quot;lemonChiffon2&quot;</span>,
			<span style="color: #ff0000;">&quot;lemonChiffon3&quot;</span>,
			<span style="color: #ff0000;">&quot;lemonChiffon4&quot;</span>,
			<span style="color: #ff0000;">&quot;cornsilk1&quot;</span>,
			<span style="color: #ff0000;">&quot;cornsilk2&quot;</span>,
			<span style="color: #ff0000;">&quot;cornsilk3&quot;</span>,
			<span style="color: #ff0000;">&quot;cornsilk4&quot;</span>,
			<span style="color: #ff0000;">&quot;ivory1&quot;</span>,
			<span style="color: #ff0000;">&quot;ivory2&quot;</span>,
			<span style="color: #ff0000;">&quot;ivory3&quot;</span>,
			<span style="color: #ff0000;">&quot;ivory4&quot;</span>,
			<span style="color: #ff0000;">&quot;honeydew1&quot;</span>,
			<span style="color: #ff0000;">&quot;honeydew2&quot;</span>,
			<span style="color: #ff0000;">&quot;honeydew3&quot;</span>,
			<span style="color: #ff0000;">&quot;honeydew4&quot;</span>,
			<span style="color: #ff0000;">&quot;lavenderBlush1&quot;</span>,
			<span style="color: #ff0000;">&quot;lavenderBlush2&quot;</span>,
			<span style="color: #ff0000;">&quot;lavenderBlush3&quot;</span>,
			<span style="color: #ff0000;">&quot;lavenderBlush4&quot;</span>,
			<span style="color: #ff0000;">&quot;mistyRose1&quot;</span>,
			<span style="color: #ff0000;">&quot;mistyRose2&quot;</span>,
			<span style="color: #ff0000;">&quot;mistyRose3&quot;</span>,
			<span style="color: #ff0000;">&quot;mistyRose4&quot;</span>,
			<span style="color: #ff0000;">&quot;azure1&quot;</span>,
			<span style="color: #ff0000;">&quot;azure2&quot;</span>,
			<span style="color: #ff0000;">&quot;azure3&quot;</span>,
			<span style="color: #ff0000;">&quot;azure4&quot;</span>,
			<span style="color: #ff0000;">&quot;slateBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;slateBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;slateBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;slateBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;royalBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;royalBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;royalBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;royalBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;blue1&quot;</span>,
			<span style="color: #ff0000;">&quot;blue2&quot;</span>,
			<span style="color: #ff0000;">&quot;blue3&quot;</span>,
			<span style="color: #ff0000;">&quot;blue4&quot;</span>,
			<span style="color: #ff0000;">&quot;dodgerBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;dodgerBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;dodgerBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;dodgerBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;steelBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;steelBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;steelBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;steelBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;deepSkyBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;deepSkyBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;deepSkyBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;deepSkyBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;skyBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;skyBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;skyBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;skyBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSkyBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSkyBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSkyBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSkyBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;slateGray1&quot;</span>,
			<span style="color: #ff0000;">&quot;slateGray2&quot;</span>,
			<span style="color: #ff0000;">&quot;slateGray3&quot;</span>,
			<span style="color: #ff0000;">&quot;slateGray4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSteelBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSteelBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSteelBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSteelBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightCyan1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightCyan2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightCyan3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightCyan4&quot;</span>,
			<span style="color: #ff0000;">&quot;paleTurquoise1&quot;</span>,
			<span style="color: #ff0000;">&quot;paleTurquoise2&quot;</span>,
			<span style="color: #ff0000;">&quot;paleTurquoise3&quot;</span>,
			<span style="color: #ff0000;">&quot;paleTurquoise4&quot;</span>,
			<span style="color: #ff0000;">&quot;cadetBlue1&quot;</span>,
			<span style="color: #ff0000;">&quot;cadetBlue2&quot;</span>,
			<span style="color: #ff0000;">&quot;cadetBlue3&quot;</span>,
			<span style="color: #ff0000;">&quot;cadetBlue4&quot;</span>,
			<span style="color: #ff0000;">&quot;turquoise1&quot;</span>,
			<span style="color: #ff0000;">&quot;turquoise2&quot;</span>,
			<span style="color: #ff0000;">&quot;turquoise3&quot;</span>,
			<span style="color: #ff0000;">&quot;turquoise4&quot;</span>,
			<span style="color: #ff0000;">&quot;cyan1&quot;</span>,
			<span style="color: #ff0000;">&quot;cyan2&quot;</span>,
			<span style="color: #ff0000;">&quot;cyan3&quot;</span>,
			<span style="color: #ff0000;">&quot;cyan4&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSlateGray1&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSlateGray2&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSlateGray3&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSlateGray4&quot;</span>,
			<span style="color: #ff0000;">&quot;aquamarine1&quot;</span>,
			<span style="color: #ff0000;">&quot;aquamarine2&quot;</span>,
			<span style="color: #ff0000;">&quot;aquamarine3&quot;</span>,
			<span style="color: #ff0000;">&quot;aquamarine4&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSeaGreen1&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSeaGreen2&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSeaGreen3&quot;</span>,
			<span style="color: #ff0000;">&quot;darkSeaGreen4&quot;</span>,
			<span style="color: #ff0000;">&quot;seaGreen1&quot;</span>,
			<span style="color: #ff0000;">&quot;seaGreen2&quot;</span>,
			<span style="color: #ff0000;">&quot;seaGreen3&quot;</span>,
			<span style="color: #ff0000;">&quot;seaGreen4&quot;</span>,
			<span style="color: #ff0000;">&quot;paleGreen1&quot;</span>,
			<span style="color: #ff0000;">&quot;paleGreen2&quot;</span>,
			<span style="color: #ff0000;">&quot;paleGreen3&quot;</span>,
			<span style="color: #ff0000;">&quot;paleGreen4&quot;</span>,
			<span style="color: #ff0000;">&quot;springGreen1&quot;</span>,
			<span style="color: #ff0000;">&quot;springGreen2&quot;</span>,
			<span style="color: #ff0000;">&quot;springGreen3&quot;</span>,
			<span style="color: #ff0000;">&quot;springGreen4&quot;</span>,
			<span style="color: #ff0000;">&quot;green1&quot;</span>,
			<span style="color: #ff0000;">&quot;green2&quot;</span>,
			<span style="color: #ff0000;">&quot;green3&quot;</span>,
			<span style="color: #ff0000;">&quot;green4&quot;</span>,
			<span style="color: #ff0000;">&quot;chartreuse1&quot;</span>,
			<span style="color: #ff0000;">&quot;chartreuse2&quot;</span>,
			<span style="color: #ff0000;">&quot;chartreuse3&quot;</span>,
			<span style="color: #ff0000;">&quot;chartreuse4&quot;</span>,
			<span style="color: #ff0000;">&quot;oliveDrab1&quot;</span>,
			<span style="color: #ff0000;">&quot;oliveDrab2&quot;</span>,
			<span style="color: #ff0000;">&quot;oliveDrab3&quot;</span>,
			<span style="color: #ff0000;">&quot;oliveDrab4&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOliveGreen1&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOliveGreen2&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOliveGreen3&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOliveGreen4&quot;</span>,
			<span style="color: #ff0000;">&quot;khaki1&quot;</span>,
			<span style="color: #ff0000;">&quot;khaki2&quot;</span>,
			<span style="color: #ff0000;">&quot;khaki3&quot;</span>,
			<span style="color: #ff0000;">&quot;khaki4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGoldenrod1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGoldenrod2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGoldenrod3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGoldenrod4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightYellow1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightYellow2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightYellow3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightYellow4&quot;</span>,
			<span style="color: #ff0000;">&quot;yellow1&quot;</span>,
			<span style="color: #ff0000;">&quot;yellow2&quot;</span>,
			<span style="color: #ff0000;">&quot;yellow3&quot;</span>,
			<span style="color: #ff0000;">&quot;yellow4&quot;</span>,
			<span style="color: #ff0000;">&quot;gold1&quot;</span>,
			<span style="color: #ff0000;">&quot;gold2&quot;</span>,
			<span style="color: #ff0000;">&quot;gold3&quot;</span>,
			<span style="color: #ff0000;">&quot;gold4&quot;</span>,
			<span style="color: #ff0000;">&quot;goldenrod1&quot;</span>,
			<span style="color: #ff0000;">&quot;goldenrod2&quot;</span>,
			<span style="color: #ff0000;">&quot;goldenrod3&quot;</span>,
			<span style="color: #ff0000;">&quot;goldenrod4&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGoldenrod1&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGoldenrod2&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGoldenrod3&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGoldenrod4&quot;</span>,
			<span style="color: #ff0000;">&quot;rosyBrown1&quot;</span>,
			<span style="color: #ff0000;">&quot;rosyBrown2&quot;</span>,
			<span style="color: #ff0000;">&quot;rosyBrown3&quot;</span>,
			<span style="color: #ff0000;">&quot;rosyBrown4&quot;</span>,
			<span style="color: #ff0000;">&quot;indianRed1&quot;</span>,
			<span style="color: #ff0000;">&quot;indianRed2&quot;</span>,
			<span style="color: #ff0000;">&quot;indianRed3&quot;</span>,
			<span style="color: #ff0000;">&quot;indianRed4&quot;</span>,
			<span style="color: #ff0000;">&quot;sienna1&quot;</span>,
			<span style="color: #ff0000;">&quot;sienna2&quot;</span>,
			<span style="color: #ff0000;">&quot;sienna3&quot;</span>,
			<span style="color: #ff0000;">&quot;sienna4&quot;</span>,
			<span style="color: #ff0000;">&quot;burlywood1&quot;</span>,
			<span style="color: #ff0000;">&quot;burlywood2&quot;</span>,
			<span style="color: #ff0000;">&quot;burlywood3&quot;</span>,
			<span style="color: #ff0000;">&quot;burlywood4&quot;</span>,
			<span style="color: #ff0000;">&quot;wheat1&quot;</span>,
			<span style="color: #ff0000;">&quot;wheat2&quot;</span>,
			<span style="color: #ff0000;">&quot;wheat3&quot;</span>,
			<span style="color: #ff0000;">&quot;wheat4&quot;</span>,
			<span style="color: #ff0000;">&quot;tan1&quot;</span>,
			<span style="color: #ff0000;">&quot;tan2&quot;</span>,
			<span style="color: #ff0000;">&quot;tan3&quot;</span>,
			<span style="color: #ff0000;">&quot;tan4&quot;</span>,
			<span style="color: #ff0000;">&quot;chocolate1&quot;</span>,
			<span style="color: #ff0000;">&quot;chocolate2&quot;</span>,
			<span style="color: #ff0000;">&quot;chocolate3&quot;</span>,
			<span style="color: #ff0000;">&quot;chocolate4&quot;</span>,
			<span style="color: #ff0000;">&quot;firebrick1&quot;</span>,
			<span style="color: #ff0000;">&quot;firebrick2&quot;</span>,
			<span style="color: #ff0000;">&quot;firebrick3&quot;</span>,
			<span style="color: #ff0000;">&quot;firebrick4&quot;</span>,
			<span style="color: #ff0000;">&quot;brown1&quot;</span>,
			<span style="color: #ff0000;">&quot;brown2&quot;</span>,
			<span style="color: #ff0000;">&quot;brown3&quot;</span>,
			<span style="color: #ff0000;">&quot;brown4&quot;</span>,
			<span style="color: #ff0000;">&quot;salmon1&quot;</span>,
			<span style="color: #ff0000;">&quot;salmon2&quot;</span>,
			<span style="color: #ff0000;">&quot;salmon3&quot;</span>,
			<span style="color: #ff0000;">&quot;salmon4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSalmon1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSalmon2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSalmon3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightSalmon4&quot;</span>,
			<span style="color: #ff0000;">&quot;orange1&quot;</span>,
			<span style="color: #ff0000;">&quot;orange2&quot;</span>,
			<span style="color: #ff0000;">&quot;orange3&quot;</span>,
			<span style="color: #ff0000;">&quot;orange4&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrange1&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrange2&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrange3&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrange4&quot;</span>,
			<span style="color: #ff0000;">&quot;coral1&quot;</span>,
			<span style="color: #ff0000;">&quot;coral2&quot;</span>,
			<span style="color: #ff0000;">&quot;coral3&quot;</span>,
			<span style="color: #ff0000;">&quot;coral4&quot;</span>,
			<span style="color: #ff0000;">&quot;tomato1&quot;</span>,
			<span style="color: #ff0000;">&quot;tomato2&quot;</span>,
			<span style="color: #ff0000;">&quot;tomato3&quot;</span>,
			<span style="color: #ff0000;">&quot;tomato4&quot;</span>,
			<span style="color: #ff0000;">&quot;orangeRed1&quot;</span>,
			<span style="color: #ff0000;">&quot;orangeRed2&quot;</span>,
			<span style="color: #ff0000;">&quot;orangeRed3&quot;</span>,
			<span style="color: #ff0000;">&quot;orangeRed4&quot;</span>,
			<span style="color: #ff0000;">&quot;red1&quot;</span>,
			<span style="color: #ff0000;">&quot;red2&quot;</span>,
			<span style="color: #ff0000;">&quot;red3&quot;</span>,
			<span style="color: #ff0000;">&quot;red4&quot;</span>,
			<span style="color: #ff0000;">&quot;deepPink1&quot;</span>,
			<span style="color: #ff0000;">&quot;deepPink2&quot;</span>,
			<span style="color: #ff0000;">&quot;deepPink3&quot;</span>,
			<span style="color: #ff0000;">&quot;deepPink4&quot;</span>,
			<span style="color: #ff0000;">&quot;hotPink1&quot;</span>,
			<span style="color: #ff0000;">&quot;hotPink2&quot;</span>,
			<span style="color: #ff0000;">&quot;hotPink3&quot;</span>,
			<span style="color: #ff0000;">&quot;hotPink4&quot;</span>,
			<span style="color: #ff0000;">&quot;pink1&quot;</span>,
			<span style="color: #ff0000;">&quot;pink2&quot;</span>,
			<span style="color: #ff0000;">&quot;pink3&quot;</span>,
			<span style="color: #ff0000;">&quot;pink4&quot;</span>,
			<span style="color: #ff0000;">&quot;lightPink1&quot;</span>,
			<span style="color: #ff0000;">&quot;lightPink2&quot;</span>,
			<span style="color: #ff0000;">&quot;lightPink3&quot;</span>,
			<span style="color: #ff0000;">&quot;lightPink4&quot;</span>,
			<span style="color: #ff0000;">&quot;paleVioletRed1&quot;</span>,
			<span style="color: #ff0000;">&quot;paleVioletRed2&quot;</span>,
			<span style="color: #ff0000;">&quot;paleVioletRed3&quot;</span>,
			<span style="color: #ff0000;">&quot;paleVioletRed4&quot;</span>,
			<span style="color: #ff0000;">&quot;maroon1&quot;</span>,
			<span style="color: #ff0000;">&quot;maroon2&quot;</span>,
			<span style="color: #ff0000;">&quot;maroon3&quot;</span>,
			<span style="color: #ff0000;">&quot;maroon4&quot;</span>,
			<span style="color: #ff0000;">&quot;violetRed1&quot;</span>,
			<span style="color: #ff0000;">&quot;violetRed2&quot;</span>,
			<span style="color: #ff0000;">&quot;violetRed3&quot;</span>,
			<span style="color: #ff0000;">&quot;violetRed4&quot;</span>,
			<span style="color: #ff0000;">&quot;magenta1&quot;</span>,
			<span style="color: #ff0000;">&quot;magenta2&quot;</span>,
			<span style="color: #ff0000;">&quot;magenta3&quot;</span>,
			<span style="color: #ff0000;">&quot;magenta4&quot;</span>,
			<span style="color: #ff0000;">&quot;orchid1&quot;</span>,
			<span style="color: #ff0000;">&quot;orchid2&quot;</span>,
			<span style="color: #ff0000;">&quot;orchid3&quot;</span>,
			<span style="color: #ff0000;">&quot;orchid4&quot;</span>,
			<span style="color: #ff0000;">&quot;plum1&quot;</span>,
			<span style="color: #ff0000;">&quot;plum2&quot;</span>,
			<span style="color: #ff0000;">&quot;plum3&quot;</span>,
			<span style="color: #ff0000;">&quot;plum4&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumOrchid1&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumOrchid2&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumOrchid3&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumOrchid4&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrchid1&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrchid2&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrchid3&quot;</span>,
			<span style="color: #ff0000;">&quot;darkOrchid4&quot;</span>,
			<span style="color: #ff0000;">&quot;purple1&quot;</span>,
			<span style="color: #ff0000;">&quot;purple2&quot;</span>,
			<span style="color: #ff0000;">&quot;purple3&quot;</span>,
			<span style="color: #ff0000;">&quot;purple4&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumPurple1&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumPurple2&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumPurple3&quot;</span>,
			<span style="color: #ff0000;">&quot;mediumPurple4&quot;</span>,
			<span style="color: #ff0000;">&quot;thistle1&quot;</span>,
			<span style="color: #ff0000;">&quot;thistle2&quot;</span>,
			<span style="color: #ff0000;">&quot;thistle3&quot;</span>,
			<span style="color: #ff0000;">&quot;thistle4&quot;</span>,
			<span style="color: #ff0000;">&quot;gray0&quot;</span>,
			<span style="color: #ff0000;">&quot;gray1&quot;</span>,
			<span style="color: #ff0000;">&quot;gray2&quot;</span>,
			<span style="color: #ff0000;">&quot;gray3&quot;</span>,
			<span style="color: #ff0000;">&quot;gray4&quot;</span>,
			<span style="color: #ff0000;">&quot;gray5&quot;</span>,
			<span style="color: #ff0000;">&quot;gray6&quot;</span>,
			<span style="color: #ff0000;">&quot;gray7&quot;</span>,
			<span style="color: #ff0000;">&quot;gray8&quot;</span>,
			<span style="color: #ff0000;">&quot;gray9&quot;</span>,
			<span style="color: #ff0000;">&quot;gray10&quot;</span>,
			<span style="color: #ff0000;">&quot;gray11&quot;</span>,
			<span style="color: #ff0000;">&quot;gray12&quot;</span>,
			<span style="color: #ff0000;">&quot;gray13&quot;</span>,
			<span style="color: #ff0000;">&quot;gray14&quot;</span>,
			<span style="color: #ff0000;">&quot;gray15&quot;</span>,
			<span style="color: #ff0000;">&quot;gray16&quot;</span>,
			<span style="color: #ff0000;">&quot;gray17&quot;</span>,
			<span style="color: #ff0000;">&quot;gray18&quot;</span>,
			<span style="color: #ff0000;">&quot;gray19&quot;</span>,
			<span style="color: #ff0000;">&quot;gray20&quot;</span>,
			<span style="color: #ff0000;">&quot;gray21&quot;</span>,
			<span style="color: #ff0000;">&quot;gray22&quot;</span>,
			<span style="color: #ff0000;">&quot;gray23&quot;</span>,
			<span style="color: #ff0000;">&quot;gray24&quot;</span>,
			<span style="color: #ff0000;">&quot;gray25&quot;</span>,
			<span style="color: #ff0000;">&quot;gray26&quot;</span>,
			<span style="color: #ff0000;">&quot;gray27&quot;</span>,
			<span style="color: #ff0000;">&quot;gray28&quot;</span>,
			<span style="color: #ff0000;">&quot;gray29&quot;</span>,
			<span style="color: #ff0000;">&quot;gray30&quot;</span>,
			<span style="color: #ff0000;">&quot;gray31&quot;</span>,
			<span style="color: #ff0000;">&quot;gray32&quot;</span>,
			<span style="color: #ff0000;">&quot;gray33&quot;</span>,
			<span style="color: #ff0000;">&quot;gray34&quot;</span>,
			<span style="color: #ff0000;">&quot;gray35&quot;</span>,
			<span style="color: #ff0000;">&quot;gray36&quot;</span>,
			<span style="color: #ff0000;">&quot;gray37&quot;</span>,
			<span style="color: #ff0000;">&quot;gray38&quot;</span>,
			<span style="color: #ff0000;">&quot;gray39&quot;</span>,
			<span style="color: #ff0000;">&quot;gray40&quot;</span>,
			<span style="color: #ff0000;">&quot;gray41&quot;</span>,
			<span style="color: #ff0000;">&quot;gray42&quot;</span>,
			<span style="color: #ff0000;">&quot;gray43&quot;</span>,
			<span style="color: #ff0000;">&quot;gray44&quot;</span>,
			<span style="color: #ff0000;">&quot;gray45&quot;</span>,
			<span style="color: #ff0000;">&quot;gray46&quot;</span>,
			<span style="color: #ff0000;">&quot;gray47&quot;</span>,
			<span style="color: #ff0000;">&quot;gray48&quot;</span>,
			<span style="color: #ff0000;">&quot;gray49&quot;</span>,
			<span style="color: #ff0000;">&quot;gray50&quot;</span>,
			<span style="color: #ff0000;">&quot;gray51&quot;</span>,
			<span style="color: #ff0000;">&quot;gray52&quot;</span>,
			<span style="color: #ff0000;">&quot;gray53&quot;</span>,
			<span style="color: #ff0000;">&quot;gray54&quot;</span>,
			<span style="color: #ff0000;">&quot;gray55&quot;</span>,
			<span style="color: #ff0000;">&quot;gray56&quot;</span>,
			<span style="color: #ff0000;">&quot;gray57&quot;</span>,
			<span style="color: #ff0000;">&quot;gray58&quot;</span>,
			<span style="color: #ff0000;">&quot;gray59&quot;</span>,
			<span style="color: #ff0000;">&quot;gray60&quot;</span>,
			<span style="color: #ff0000;">&quot;gray61&quot;</span>,
			<span style="color: #ff0000;">&quot;gray62&quot;</span>,
			<span style="color: #ff0000;">&quot;gray63&quot;</span>,
			<span style="color: #ff0000;">&quot;gray64&quot;</span>,
			<span style="color: #ff0000;">&quot;gray65&quot;</span>,
			<span style="color: #ff0000;">&quot;gray66&quot;</span>,
			<span style="color: #ff0000;">&quot;gray67&quot;</span>,
			<span style="color: #ff0000;">&quot;gray68&quot;</span>,
			<span style="color: #ff0000;">&quot;gray69&quot;</span>,
			<span style="color: #ff0000;">&quot;gray70&quot;</span>,
			<span style="color: #ff0000;">&quot;gray71&quot;</span>,
			<span style="color: #ff0000;">&quot;gray72&quot;</span>,
			<span style="color: #ff0000;">&quot;gray73&quot;</span>,
			<span style="color: #ff0000;">&quot;gray74&quot;</span>,
			<span style="color: #ff0000;">&quot;gray75&quot;</span>,
			<span style="color: #ff0000;">&quot;gray76&quot;</span>,
			<span style="color: #ff0000;">&quot;gray77&quot;</span>,
			<span style="color: #ff0000;">&quot;gray78&quot;</span>,
			<span style="color: #ff0000;">&quot;gray79&quot;</span>,
			<span style="color: #ff0000;">&quot;gray80&quot;</span>,
			<span style="color: #ff0000;">&quot;gray81&quot;</span>,
			<span style="color: #ff0000;">&quot;gray82&quot;</span>,
			<span style="color: #ff0000;">&quot;gray83&quot;</span>,
			<span style="color: #ff0000;">&quot;gray84&quot;</span>,
			<span style="color: #ff0000;">&quot;gray85&quot;</span>,
			<span style="color: #ff0000;">&quot;gray86&quot;</span>,
			<span style="color: #ff0000;">&quot;gray87&quot;</span>,
			<span style="color: #ff0000;">&quot;gray88&quot;</span>,
			<span style="color: #ff0000;">&quot;gray89&quot;</span>,
			<span style="color: #ff0000;">&quot;gray90&quot;</span>,
			<span style="color: #ff0000;">&quot;gray91&quot;</span>,
			<span style="color: #ff0000;">&quot;gray92&quot;</span>,
			<span style="color: #ff0000;">&quot;gray93&quot;</span>,
			<span style="color: #ff0000;">&quot;gray94&quot;</span>,
			<span style="color: #ff0000;">&quot;gray95&quot;</span>,
			<span style="color: #ff0000;">&quot;gray96&quot;</span>,
			<span style="color: #ff0000;">&quot;gray97&quot;</span>,
			<span style="color: #ff0000;">&quot;gray98&quot;</span>,
			<span style="color: #ff0000;">&quot;gray99&quot;</span>,
			<span style="color: #ff0000;">&quot;gray100&quot;</span>,
			<span style="color: #ff0000;">&quot;darkGrey&quot;</span>,
			<span style="color: #ff0000;">&quot;darkBlue&quot;</span>,
			<span style="color: #ff0000;">&quot;darkCyan&quot;</span>,
			<span style="color: #ff0000;">&quot;darkMagenta&quot;</span>,
			<span style="color: #ff0000;">&quot;darkRed&quot;</span>,
			<span style="color: #ff0000;">&quot;lightGreen&quot;</span>
			<span style="color: #66cc66;">&#93;</span>;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">//  colors</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const snow:uint = 0xfffafa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const ghostWhite:uint = 0xf8f8ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const whiteSmoke:uint = 0xf5f5f5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gainsboro:uint = 0xdcdcdc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const floralWhite:uint = 0xfffaf0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const oldLace:uint = 0xfdf5e6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const linen:uint = 0xfaf0e6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const antiqueWhite:uint = 0xfaebd7;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const papayaWhip:uint = 0xffefd5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blanchedAlmond:uint = 0xffebcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const bisque:uint = 0xffe4c4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const peachPuff:uint = 0xffdab9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navajoWhite:uint = 0xffdead;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const moccasin:uint = 0xffe4b5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cornsilk:uint = 0xfff8dc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const ivory:uint = 0xfffff0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lemonChiffon:uint = 0xfffacd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seashell:uint = 0xfff5ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const honeydew:uint = 0xf0fff0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mintCream:uint = 0xf5fffa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const azure:uint = 0xf0ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const aliceBlue:uint = 0xf0f8ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lavender:uint = 0xe6e6fa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lavenderBlush:uint = 0xfff0f5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mistyRose:uint = 0xffe4e1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const white:uint = 0xffffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const black:uint = 0x000000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSlateGray:uint = 0x2f4f4f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const dimGrey:uint = 0x696969;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateGray:uint = 0x708090;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSlateGrey:uint = 0x778899;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray:uint = 0xbebebe;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGray:uint = 0xd3d3d3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const midnightBlue:uint = 0x191970;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navy:uint = 0x000080;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navyBlue:uint = 0x000080;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cornflowerBlue:uint = 0x6495ed;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSlateBlue:uint = 0x483d8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateBlue:uint = 0x6a5acd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumSlateBlue:uint = 0x7b68ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSlateBlue:uint = 0x8470ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumBlue:uint = 0x0000cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const royalBlue:uint = 0x4169e1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blue:uint = 0x0000ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const dodgerBlue:uint = 0x1e90ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepSkyBlue:uint = 0x00bfff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const skyBlue:uint = 0x87ceeb;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSkyBlue:uint = 0x87cefa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const steelBlue:uint = 0x4682b4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSteelBlue:uint = 0xb0c4de;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightBlue:uint = 0xadd8e6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const powderBlue:uint = 0xb0e0e6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleTurquoise:uint = 0xafeeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkTurquoise:uint = 0x00ced1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumTurquoise:uint = 0x48d1cc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const turquoise:uint = 0x40e0d0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cyan:uint = 0x00ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightCyan:uint = 0xe0ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cadetBlue:uint = 0x5f9ea0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumAquamarine:uint = 0x66cdaa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const aquamarine:uint = 0x7fffd4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGreen:uint = 0x006400;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOliveGreen:uint = 0x556b2f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSeaGreen:uint = 0x8fbc8f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seaGreen:uint = 0x2e8b57;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumSeaGreen:uint = 0x3cb371;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSeaGreen:uint = 0x20b2aa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleGreen:uint = 0x98fb98;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const springGreen:uint = 0x00ff7f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lawnGreen:uint = 0x7cfc00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const green:uint = 0x00ff00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chartreuse:uint = 0x7fff00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumSpringGreen:uint = 0x00fa9a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const greenYellow:uint = 0xadff2f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const limeGreen:uint = 0x32cd32;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const yellowGreen:uint = 0x9acd32;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const forestGreen:uint = 0x228b22;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const oliveDrab:uint = 0x6b8e23;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkKhaki:uint = 0xbdb76b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const khaki:uint = 0xf0e68c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleGoldenrod:uint = 0xeee8aa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGoldenrodYellow:uint = 0xfafad2;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightYellow:uint = 0xffffe0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const yellow:uint = 0xffff00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gold:uint = 0xffd700;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGoldenrod:uint = 0xeedd82;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const goldenrod:uint = 0xdaa520;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGoldenrod:uint = 0xb8860b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const rosyBrown:uint = 0xbc8f8f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const indianRed:uint = 0xcd5c5c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const saddleBrown:uint = 0x8b4513;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const sienna:uint = 0xa0522d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const peru:uint = 0xcd853f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const burlywood:uint = 0xdeb887;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const beige:uint = 0xf5f5dc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const wheat:uint = 0xf5deb3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const sandyBrown:uint = 0xf4a460;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const <span style="color: #0066CC;">tan</span>:uint = 0xd2b48c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chocolate:uint = 0xd2691e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const firebrick:uint = 0xb22222;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const brown:uint = 0xa52a2a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSalmon:uint = 0xe9967a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const salmon:uint = 0xfa8072;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSalmon:uint = 0xffa07a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orange:uint = 0xffa500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrange:uint = 0xff8c00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const coral:uint = 0xff7f50;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightCoral:uint = 0xf08080;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tomato:uint = 0xff6347;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orangeRed:uint = 0xff4500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const red:uint = 0xff0000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const hotPink:uint = 0xff69b4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepPink:uint = 0xff1493;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const pink:uint = 0xffc0cb;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightPink:uint = 0xffb6c1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleVioletRed:uint = 0xdb7093;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const maroon:uint = 0xb03060;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumVioletRed:uint = 0xc71585;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const violetRed:uint = 0xd02090;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const magenta:uint = 0xff00ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const violet:uint = 0xee82ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const plum:uint = 0xdda0dd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orchid:uint = 0xda70d6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumOrchid:uint = 0xba55d3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrchid:uint = 0x9932cc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkViolet:uint = 0x9400d3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blueViolet:uint = 0x8a2be2;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const purple:uint = 0xa020f0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumPurple:uint = 0x9370db;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const thistle:uint = 0xd8bfd8;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const snow1:uint = 0xfffafa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const snow2:uint = 0xeee9e9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const snow3:uint = 0xcdc9c9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const snow4:uint = 0x8b8989;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seashell1:uint = 0xfff5ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seashell2:uint = 0xeee5de;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seashell3:uint = 0xcdc5bf;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seashell4:uint = 0x8b8682;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const antiqueWhite1:uint = 0xffefdb;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const antiqueWhite2:uint = 0xeedfcc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const antiqueWhite3:uint = 0xcdc0b0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const antiqueWhite4:uint = 0x8b8378;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const bisque1:uint = 0xffe4c4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const bisque2:uint = 0xeed5b7;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const bisque3:uint = 0xcdb79e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const bisque4:uint = 0x8b7d6b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const peachPuff1:uint = 0xffdab9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const peachPuff2:uint = 0xeecbad;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const peachPuff3:uint = 0xcdaf95;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const peachPuff4:uint = 0x8b7765;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navajoWhite1:uint = 0xffdead;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navajoWhite2:uint = 0xeecfa1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navajoWhite3:uint = 0xcdb38b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const navajoWhite4:uint = 0x8b795e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lemonChiffon1:uint = 0xfffacd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lemonChiffon2:uint = 0xeee9bf;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lemonChiffon3:uint = 0xcdc9a5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lemonChiffon4:uint = 0x8b8970;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cornsilk1:uint = 0xfff8dc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cornsilk2:uint = 0xeee8cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cornsilk3:uint = 0xcdc8b1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cornsilk4:uint = 0x8b8878;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const ivory1:uint = 0xfffff0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const ivory2:uint = 0xeeeee0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const ivory3:uint = 0xcdcdc1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const ivory4:uint = 0x8b8b83;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const honeydew1:uint = 0xf0fff0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const honeydew2:uint = 0xe0eee0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const honeydew3:uint = 0xc1cdc1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const honeydew4:uint = 0x838b83;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lavenderBlush1:uint = 0xfff0f5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lavenderBlush2:uint = 0xeee0e5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lavenderBlush3:uint = 0xcdc1c5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lavenderBlush4:uint = 0x8b8386;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mistyRose1:uint = 0xffe4e1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mistyRose2:uint = 0xeed5d2;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mistyRose3:uint = 0xcdb7b5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mistyRose4:uint = 0x8b7d7b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const azure1:uint = 0xf0ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const azure2:uint = 0xe0eeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const azure3:uint = 0xc1cdcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const azure4:uint = 0x838b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateBlue1:uint = 0x836fff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateBlue2:uint = 0x7a67ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateBlue3:uint = 0x6959cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateBlue4:uint = 0x473c8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const royalBlue1:uint = 0x4876ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const royalBlue2:uint = 0x436eee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const royalBlue3:uint = 0x3a5fcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const royalBlue4:uint = 0x27408b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blue1:uint = 0x0000ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blue2:uint = 0x0000ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blue3:uint = 0x0000cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const blue4:uint = 0x00008b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const dodgerBlue1:uint = 0x1e90ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const dodgerBlue2:uint = 0x1c86ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const dodgerBlue3:uint = 0x1874cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const dodgerBlue4:uint = 0x104e8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const steelBlue1:uint = 0x63b8ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const steelBlue2:uint = 0x5cacee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const steelBlue3:uint = 0x4f94cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const steelBlue4:uint = 0x36648b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepSkyBlue1:uint = 0x00bfff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepSkyBlue2:uint = 0x00b2ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepSkyBlue3:uint = 0x009acd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepSkyBlue4:uint = 0x00688b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const skyBlue1:uint = 0x87ceff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const skyBlue2:uint = 0x7ec0ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const skyBlue3:uint = 0x6ca6cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const skyBlue4:uint = 0x4a708b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSkyBlue1:uint = 0xb0e2ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSkyBlue2:uint = 0xa4d3ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSkyBlue3:uint = 0x8db6cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSkyBlue4:uint = 0x607b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateGray1:uint = 0xc6e2ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateGray2:uint = 0xb9d3ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateGray3:uint = 0x9fb6cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const slateGray4:uint = 0x6c7b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSteelBlue1:uint = 0xcae1ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSteelBlue2:uint = 0xbcd2ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSteelBlue3:uint = 0xa2b5cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSteelBlue4:uint = 0x6e7b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightBlue1:uint = 0xbfefff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightBlue2:uint = 0xb2dfee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightBlue3:uint = 0x9ac0cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightBlue4:uint = 0x68838b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightCyan1:uint = 0xe0ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightCyan2:uint = 0xd1eeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightCyan3:uint = 0xb4cdcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightCyan4:uint = 0x7a8b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleTurquoise1:uint = 0xbbffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleTurquoise2:uint = 0xaeeeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleTurquoise3:uint = 0x96cdcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleTurquoise4:uint = 0x668b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cadetBlue1:uint = 0x98f5ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cadetBlue2:uint = 0x8ee5ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cadetBlue3:uint = 0x7ac5cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cadetBlue4:uint = 0x53868b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const turquoise1:uint = 0x00f5ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const turquoise2:uint = 0x00e5ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const turquoise3:uint = 0x00c5cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const turquoise4:uint = 0x00868b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cyan1:uint = 0x00ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cyan2:uint = 0x00eeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cyan3:uint = 0x00cdcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const cyan4:uint = 0x008b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSlateGray1:uint = 0x97ffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSlateGray2:uint = 0x8deeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSlateGray3:uint = 0x79cdcd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSlateGray4:uint = 0x528b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const aquamarine1:uint = 0x7fffd4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const aquamarine2:uint = 0x76eec6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const aquamarine3:uint = 0x66cdaa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const aquamarine4:uint = 0x458b74;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSeaGreen1:uint = 0xc1ffc1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSeaGreen2:uint = 0xb4eeb4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSeaGreen3:uint = 0x9bcd9b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkSeaGreen4:uint = 0x698b69;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seaGreen1:uint = 0x54ff9f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seaGreen2:uint = 0x4eee94;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seaGreen3:uint = 0x43cd80;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const seaGreen4:uint = 0x2e8b57;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleGreen1:uint = 0x9aff9a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleGreen2:uint = 0x90ee90;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleGreen3:uint = 0x7ccd7c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleGreen4:uint = 0x548b54;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const springGreen1:uint = 0x00ff7f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const springGreen2:uint = 0x00ee76;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const springGreen3:uint = 0x00cd66;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const springGreen4:uint = 0x008b45;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const green1:uint = 0x00ff00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const green2:uint = 0x00ee00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const green3:uint = 0x00cd00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const green4:uint = 0x008b00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chartreuse1:uint = 0x7fff00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chartreuse2:uint = 0x76ee00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chartreuse3:uint = 0x66cd00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chartreuse4:uint = 0x458b00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const oliveDrab1:uint = 0xc0ff3e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const oliveDrab2:uint = 0xb3ee3a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const oliveDrab3:uint = 0x9acd32;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const oliveDrab4:uint = 0x698b22;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOliveGreen1:uint = 0xcaff70;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOliveGreen2:uint = 0xbcee68;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOliveGreen3:uint = 0xa2cd5a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOliveGreen4:uint = 0x6e8b3d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const khaki1:uint = 0xfff68f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const khaki2:uint = 0xeee685;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const khaki3:uint = 0xcdc673;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const khaki4:uint = 0x8b864e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGoldenrod1:uint = 0xffec8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGoldenrod2:uint = 0xeedc82;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGoldenrod3:uint = 0xcdbe70;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGoldenrod4:uint = 0x8b814c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightYellow1:uint = 0xffffe0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightYellow2:uint = 0xeeeed1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightYellow3:uint = 0xcdcdb4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightYellow4:uint = 0x8b8b7a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const yellow1:uint = 0xffff00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const yellow2:uint = 0xeeee00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const yellow3:uint = 0xcdcd00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const yellow4:uint = 0x8b8b00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gold1:uint = 0xffd700;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gold2:uint = 0xeec900;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gold3:uint = 0xcdad00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gold4:uint = 0x8b7500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const goldenrod1:uint = 0xffc125;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const goldenrod2:uint = 0xeeb422;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const goldenrod3:uint = 0xcd9b1d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const goldenrod4:uint = 0x8b6914;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGoldenrod1:uint = 0xffb90f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGoldenrod2:uint = 0xeead0e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGoldenrod3:uint = 0xcd950c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGoldenrod4:uint = 0x8b6508;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const rosyBrown1:uint = 0xffc1c1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const rosyBrown2:uint = 0xeeb4b4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const rosyBrown3:uint = 0xcd9b9b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const rosyBrown4:uint = 0x8b6969;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const indianRed1:uint = 0xff6a6a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const indianRed2:uint = 0xee6363;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const indianRed3:uint = 0xcd5555;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const indianRed4:uint = 0x8b3a3a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const sienna1:uint = 0xff8247;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const sienna2:uint = 0xee7942;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const sienna3:uint = 0xcd6839;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const sienna4:uint = 0x8b4726;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const burlywood1:uint = 0xffd39b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const burlywood2:uint = 0xeec591;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const burlywood3:uint = 0xcdaa7d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const burlywood4:uint = 0x8b7355;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const wheat1:uint = 0xffe7ba;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const wheat2:uint = 0xeed8ae;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const wheat3:uint = 0xcdba96;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const wheat4:uint = 0x8b7e66;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tan1:uint = 0xffa54f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tan2:uint = 0xee9a49;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tan3:uint = 0xcd853f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tan4:uint = 0x8b5a2b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chocolate1:uint = 0xff7f24;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chocolate2:uint = 0xee7621;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chocolate3:uint = 0xcd661d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const chocolate4:uint = 0x8b4513;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const firebrick1:uint = 0xff3030;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const firebrick2:uint = 0xee2c2c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const firebrick3:uint = 0xcd2626;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const firebrick4:uint = 0x8b1a1a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const brown1:uint = 0xff4040;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const brown2:uint = 0xee3b3b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const brown3:uint = 0xcd3333;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const brown4:uint = 0x8b2323;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const salmon1:uint = 0xff8c69;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const salmon2:uint = 0xee8262;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const salmon3:uint = 0xcd7054;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const salmon4:uint = 0x8b4c39;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSalmon1:uint = 0xffa07a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSalmon2:uint = 0xee9572;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSalmon3:uint = 0xcd8162;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightSalmon4:uint = 0x8b5742;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orange1:uint = 0xffa500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orange2:uint = 0xee9a00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orange3:uint = 0xcd8500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orange4:uint = 0x8b5a00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrange1:uint = 0xff7f00;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrange2:uint = 0xee7600;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrange3:uint = 0xcd6600;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrange4:uint = 0x8b4500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const coral1:uint = 0xff7256;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const coral2:uint = 0xee6a50;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const coral3:uint = 0xcd5b45;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const coral4:uint = 0x8b3e2f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tomato1:uint = 0xff6347;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tomato2:uint = 0xee5c42;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tomato3:uint = 0xcd4f39;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const tomato4:uint = 0xff6347;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orangeRed1:uint = 0xff4500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orangeRed2:uint = 0xee4000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orangeRed3:uint = 0xcd3700;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orangeRed4:uint = 0x8b2500;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const red1:uint = 0xff0000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const red2:uint = 0xee0000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const red3:uint = 0xcd0000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const red4:uint = 0x8b0000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepPink1:uint = 0xff1493;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepPink2:uint = 0xee1289;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepPink3:uint = 0xcd1076;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const deepPink4:uint = 0x8b0a50;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const hotPink1:uint = 0xff6eb4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const hotPink2:uint = 0xee6aa7;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const hotPink3:uint = 0xcd6090;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const hotPink4:uint = 0x8b3a62;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const pink1:uint = 0xffb5c5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const pink2:uint = 0xeea9b8;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const pink3:uint = 0xcd919e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const pink4:uint = 0x8b636c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightPink1:uint = 0xffaeb9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightPink2:uint = 0xeea2ad;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightPink3:uint = 0xcd8c95;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightPink4:uint = 0x8b5f65;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleVioletRed1:uint = 0xff82ab;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleVioletRed2:uint = 0xee799f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleVioletRed3:uint = 0xcd6889;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const paleVioletRed4:uint = 0x8b475d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const maroon1:uint = 0xff34b3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const maroon2:uint = 0xee30a7;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const maroon3:uint = 0xcd2990;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const maroon4:uint = 0x8b1c62;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const violetRed1:uint = 0xff3e96;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const violetRed2:uint = 0xee3a8c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const violetRed3:uint = 0xcd3278;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const violetRed4:uint = 0x8b2252;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const magenta1:uint = 0xff00ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const magenta2:uint = 0xee00ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const magenta3:uint = 0xcd00cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const magenta4:uint = 0x8b008b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orchid1:uint = 0xff83fa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orchid2:uint = 0xee7ae9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orchid3:uint = 0xcd69c9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const orchid4:uint = 0x8b4789;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const plum1:uint = 0xffbbff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const plum2:uint = 0xeeaeee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const plum3:uint = 0xcd96cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const plum4:uint = 0x8b668b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumOrchid1:uint = 0xe066ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumOrchid2:uint = 0xd15fee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumOrchid3:uint = 0xb452cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumOrchid4:uint = 0x7a378b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrchid1:uint = 0xbf3eff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrchid2:uint = 0xb23aee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrchid3:uint = 0x9a32cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkOrchid4:uint = 0x68228b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const purple1:uint = 0x9b30ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const purple2:uint = 0x912cee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const purple3:uint = 0x7d26cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const purple4:uint = 0x551a8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumPurple1:uint = 0xab82ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumPurple2:uint = 0x9f79ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumPurple3:uint = 0x8968cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const mediumPurple4:uint = 0x5d478b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const thistle1:uint = 0xffe1ff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const thistle2:uint = 0xeed2ee;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const thistle3:uint = 0xcdb5cd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const thistle4:uint = 0x8b7b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray0:uint = 0x000000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray1:uint = 0x030303;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray2:uint = 0x050505;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray3:uint = 0x080808;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray4:uint = 0x0a0a0a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray5:uint = 0x0d0d0d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray6:uint = 0x0f0f0f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray7:uint = 0x121212;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray8:uint = 0x141414;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray9:uint = 0x171717;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray10:uint = 0x1a1a1a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray11:uint = 0x1c1c1c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray12:uint = 0x1f1f1f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray13:uint = 0x212121;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray14:uint = 0x242424;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray15:uint = 0x262626;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray16:uint = 0x292929;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray17:uint = 0x2b2b2b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray18:uint = 0x2e2e2e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray19:uint = 0x303030;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray20:uint = 0x333333;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray21:uint = 0x363636;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray22:uint = 0x383838;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray23:uint = 0x3b3b3b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray24:uint = 0x3d3d3d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray25:uint = 0x404040;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray26:uint = 0x424242;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray27:uint = 0x454545;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray28:uint = 0x474747;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray29:uint = 0x4a4a4a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray30:uint = 0x4d4d4d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray31:uint = 0x4f4f4f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray32:uint = 0x525252;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray33:uint = 0x545454;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray34:uint = 0x575757;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray35:uint = 0x595959;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray36:uint = 0x5c5c5c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray37:uint = 0x5e5e5e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray38:uint = 0x616161;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray39:uint = 0x636363;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray40:uint = 0x666666;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray41:uint = 0x696969;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray42:uint = 0x6b6b6b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray43:uint = 0x6e6e6e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray44:uint = 0x707070;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray45:uint = 0x737373;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray46:uint = 0x757575;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray47:uint = 0x787878;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray48:uint = 0x7a7a7a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray49:uint = 0x7d7d7d;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray50:uint = 0x7f7f7f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray51:uint = 0x828282;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray52:uint = 0x858585;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray53:uint = 0x878787;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray54:uint = 0x8a8a8a;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray55:uint = 0x8c8c8c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray56:uint = 0x8f8f8f;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray57:uint = 0x919191;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray58:uint = 0x949494;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray59:uint = 0x969696;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray60:uint = 0x999999;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray61:uint = 0x9c9c9c;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray62:uint = 0x9e9e9e;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray63:uint = 0xa1a1a1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray64:uint = 0xa3a3a3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray65:uint = 0xa6a6a6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray66:uint = 0xa8a8a8;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray67:uint = 0xababab;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray68:uint = 0xadadad;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray69:uint = 0xb0b0b0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray70:uint = 0xb3b3b3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray71:uint = 0xb5b5b5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray72:uint = 0xb8b8b8;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray73:uint = 0xbababa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray74:uint = 0xbdbdbd;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray75:uint = 0xbfbfbf;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray76:uint = 0xc2c2c2;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray77:uint = 0xc4c4c4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray78:uint = 0xc7c7c7;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray79:uint = 0xc9c9c9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray80:uint = 0xcccccc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray81:uint = 0xcfcfcf;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray82:uint = 0xd1d1d1;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray83:uint = 0xd4d4d4;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray84:uint = 0xd6d6d6;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray85:uint = 0xd9d9d9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray86:uint = 0xdbdbdb;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray87:uint = 0xdedede;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray88:uint = 0xe0e0e0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray89:uint = 0xe3e3e3;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray90:uint = 0xe5e5e5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray91:uint = 0xe8e8e8;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray92:uint = 0xebebeb;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray93:uint = 0xededed;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray94:uint = 0xf0f0f0;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray95:uint = 0xf2f2f2;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray96:uint = 0xf5f5f5;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray97:uint = 0xf7f7f7;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray98:uint = 0xfafafa;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray99:uint = 0xfcfcfc;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const gray100:uint = 0xffffff;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkGrey:uint = 0xa9a9a9;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkBlue:uint = 0x00008b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkCyan:uint = 0x008b8b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkMagenta:uint = 0x8b008b;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const darkRed:uint = 0x8b0000;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const lightGreen:uint = 0x90ee90;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/30/rgb-color-palette/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RGB color palette study</title>
		<link>http://www.jasonsturges.com/2010/07/30/random-color-rgb-color-palette-studies/</link>
		<comments>http://www.jasonsturges.com/2010/07/30/random-color-rgb-color-palette-studies/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 21:03:11 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=135</guid>
		<description><![CDATA[Let&#8217;s add color and combine a RGB color study. Blitting features a convenient ColorPalette class which contains an integer (hex) enumeration of default X11 RGB X colors. Each color name is defined as a String with a list of all possible colors available via the Colors static member: 1 2 3 import com.jasonsturges.labs.blitting.color.ColorPalette; &#160; var [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s add color and combine a RGB color study.</p>
<p>Blitting features a convenient ColorPalette class which contains an integer (hex) enumeration of default X11 RGB X colors.</p>
<p>Each color name is defined as a String with a list of all possible colors available via the Colors static member:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">ColorPalette</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> colors:<span style="color: #0066CC;">Array</span> = ColorPalette.<span style="color: #006600;">Colors</span>;</pre></td></tr></table></div>

<p>To iterate the collection and access the integer (hex) value of the RGB color, you could implement:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">for</span> each<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> colorName:<span style="color: #0066CC;">String</span> <span style="color: #b1b100;">in</span> ColorPalette.<span style="color: #006600;">Colors</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:uint = ColorPalette<span style="color: #66cc66;">&#91;</span>colorName<span style="color: #66cc66;">&#93;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// ...or</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> ColorPalette.<span style="color: #006600;">Colors</span>.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:uint = ColorPalette<span style="color: #66cc66;">&#91;</span>ColorPalette.<span style="color: #006600;">Colors</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span></pre></td></tr></table></div>

<p>Let&#8217;s apply this and take it further with a color study visualization of RGB values.</p>
<p>Blitting offers some color utility functionality in a Color class.  For any integer (hex) value, we may obtain red, green, and blue for 24-bit colors, and alpha for 32-bit colors.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #0066CC;">Color</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">ColorPalette</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:uint = ColorPalette.<span style="color: #006600;">navajoWhite</span>; <span style="color: #808080; font-style: italic;">// 0xffdead</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> red:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getRed</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> green:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getGreen</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> blue:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getBlue</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Parsing 24-bit colors for RGB values, or 32-bit colors for ARGB is done with bitwise operators.</p>
<p>Take a look at Blitting&#8217;s Color class:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Color</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting.color</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">Stroke</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * Color structure.
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> <span style="color: #0066CC;">Color</span>
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">//  (A)RGB to int</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get 32-bit ARGB color as integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getColor32<span style="color: #66cc66;">&#40;</span>alpha:uint, red:uint, green:uint, blue:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> alpha <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">24</span> <span style="color: #66cc66;">|</span> red <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">16</span> <span style="color: #66cc66;">|</span> green <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">|</span> blue;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get 32-bit RGBA color as integer (hex).
		 * 
		 *  In ActionScript, ARGB is typically used.
		 *  Use getColor32 for ARGB value.
		 * 
		 *  This function is provided for compatibility.
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getColor32RGBA<span style="color: #66cc66;">&#40;</span>red:uint, green:uint, blue:uint, alpha:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> red <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">24</span> <span style="color: #66cc66;">|</span> green <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">16</span> <span style="color: #66cc66;">|</span> blue <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">|</span> alpha;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get 24-bit RGB color as integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getColor24<span style="color: #66cc66;">&#40;</span>red:uint, green:uint, blue:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> red <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">16</span> <span style="color: #66cc66;">|</span> green <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">|</span> blue;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">//  int to (A)RGB</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get ARGB values from 32-bit integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getARGB<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> alpha:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #cc66cc;">24</span>;
			<span style="color: #000000; font-weight: bold;">var</span> red:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">16</span>;
			<span style="color: #000000; font-weight: bold;">var</span> green:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
			<span style="color: #000000; font-weight: bold;">var</span> blue:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#91;</span> alpha, red, green, blue <span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get RGBA values from 32-bit integer (hex).
		 * 
		 *  In ActionScript, ARGB is typically used.
		 *  Use getARGB for ARGB value.
		 * 
		 *  This function is provided for compatibility.
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getRGBA<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> red:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #cc66cc;">24</span>;
			<span style="color: #000000; font-weight: bold;">var</span> green:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">16</span>;
			<span style="color: #000000; font-weight: bold;">var</span> blue:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
			<span style="color: #000000; font-weight: bold;">var</span> alpha:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#91;</span> red, green, blue, alpha <span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get RGB values from 24-bit integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">getRGB</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> red:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">16</span>;
			<span style="color: #000000; font-weight: bold;">var</span> green:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
			<span style="color: #000000; font-weight: bold;">var</span> blue:uint = <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#91;</span> red, green, blue <span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">//  A,R,G,B, from int</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get Alpha from a 32-bit integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getAlpha<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #cc66cc;">24</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get Red from an integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getRed<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">16</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get Green from an integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getGreen<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Get Blue from an integer (hex). */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getBlue<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>:uint<span style="color: #66cc66;">&#41;</span>:uint
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">&amp;</span> 0xFF;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>By taking RGB values, we can assemble a visualization of how the X11 colors enumerated in the ColorPalette class correlate.</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteRB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/color-palette-rb.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/color-palette-rb.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p>Origin (x,y = 0; upper left corner) is equivalent to 0&#215;000000 (#000000).</p>
<p>Along the x axis, as red values increase the color markers move right so that colors with the most red (0xff) end up on the right side of the chart.</p>
<p>Along the y axis, as blue values increase the color markers move towards the bottom so that colors with the most blue (0xff) end up on the bottom of the chart.</p>
<p>Magnitude of green is represented in the size of the color markers so that colors with the most green (0xff) end up the largest in diameter.</p>
<p>Compare that with x=red, y=green, diameter=blue</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteRG"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/color-palette-rg.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/color-palette-rg.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p>Or, x=green, y=blue, diameter=red</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/color-palette-gb.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/color-palette-gb.swf" width="300" height="300"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p>Source code for the above visualizations:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_ColorPalette</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #0066CC;">Color</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">ColorPalette</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Graphics</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">280</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">280</span>, <span style="color: #0066CC;">backgroundColor</span>=0xffffff, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_ColorPalette <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_ColorPalette<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			addChild<span style="color: #66cc66;">&#40;</span>graphPalette<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">256</span>, <span style="color: #cc66cc;">256</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> graphPalette<span style="color: #66cc66;">&#40;</span>w:<span style="color: #0066CC;">Number</span>, h:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:Sprite
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> s:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			s.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">12</span>;
			s.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">12</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> g:Graphics = s.<span style="color: #006600;">graphics</span>;
			g.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> dx:uint = <span style="color: #cc66cc;">0</span>;
			<span style="color: #000000; font-weight: bold;">var</span> dy:uint = <span style="color: #cc66cc;">0</span>;
&nbsp;
			<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> colorName:<span style="color: #0066CC;">String</span> <span style="color: #b1b100;">in</span> ColorPalette.<span style="color: #006600;">Colors</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:uint = ColorPalette<span style="color: #66cc66;">&#91;</span>colorName<span style="color: #66cc66;">&#93;</span>;
&nbsp;
				<span style="color: #000000; font-weight: bold;">var</span> red:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getRed</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> green:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getGreen</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> blue:uint = <span style="color: #0066CC;">Color</span>.<span style="color: #006600;">getBlue</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				g.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>, <span style="color: #cc66cc;">0.5</span><span style="color: #66cc66;">&#41;</span>;
				g.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				dy = w <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>red <span style="color: #66cc66;">/</span> 0xff<span style="color: #66cc66;">&#41;</span>;
				dx = h <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>blue <span style="color: #66cc66;">/</span> 0xff<span style="color: #66cc66;">&#41;</span>;
				g.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span>dx, dy, <span style="color: #66cc66;">&#40;</span>w <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.03</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>green <span style="color: #66cc66;">/</span> 0xff<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				g.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/30/random-color-rgb-color-palette-studies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending RandomTimer &#8211; FunctionTimer</title>
		<link>http://www.jasonsturges.com/2010/07/30/extending-randomtimer-functiontimer/</link>
		<comments>http://www.jasonsturges.com/2010/07/30/extending-randomtimer-functiontimer/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 06:30:20 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=187</guid>
		<description><![CDATA[Extending RandomTimer is easy, with a handler for onTimerEvent built in. Let&#8217;s try an example &#8211; FunctionTimer, a class that inherits RandomTimer (therefore inheriting flash.utils.Timer) which maintains a collection of function pointers. At random intervals, all functions within the Vector of Functions is executed. Example class: FunctionTimer 1 2 3 4 5 6 7 8 [...]]]></description>
			<content:encoded><![CDATA[<p>Extending RandomTimer is easy, with a handler for onTimerEvent built in.</p>
<p>Let&#8217;s try an example &#8211; FunctionTimer, a class that inherits RandomTimer (therefore inheriting flash.utils.Timer) which maintains a collection of function pointers.  At random intervals, all functions within the Vector of Functions is executed.</p>
<p>Example class: FunctionTimer</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  FunctionTimer</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting.examples.time</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>.<span style="color: #0066CC;">time</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">time</span>.<span style="color: #006600;">RandomTimer</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * &lt;p&gt;
	 * Example extension of RandomTimer.&lt;br /&gt;
	 * &lt;br /&gt;
	 * In this implementation, function pointers may be
	 * assigned to RandomTimer's on timer event.
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FunctionTimer <span style="color: #0066CC;">extends</span> RandomTimer
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Functions to be executed on timer event. */</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _functions:Vector.<span style="color: #66cc66;">&lt;</span>Function<span style="color: #66cc66;">&gt;</span>;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** constructor, as RandomTimer. */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FunctionTimer<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">min</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">max</span>:<span style="color: #0066CC;">Number</span>, repeatCount:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">min</span>, <span style="color: #0066CC;">max</span>, repeatCount<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_functions = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&lt;</span>Function<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Add a function to be executed on timer event. */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addFunction<span style="color: #66cc66;">&#40;</span>f:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_functions.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>f<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Execute function on timer event. */</span>
		override protected <span style="color: #000000; font-weight: bold;">function</span> timerHandler<span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span>.<span style="color: #006600;">timerHandler</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> f:<span style="color: #000000; font-weight: bold;">Function</span> <span style="color: #b1b100;">in</span> _functions<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>f <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
					f<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Implemented similar in an application as the previous post regarding RandomTimer:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_FunctionTimer</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>.<span style="color: #0066CC;">time</span>.<span style="color: #006600;">FunctionTimer</span>;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">100</span>, <span style="color: #0066CC;">backgroundColor</span>=0xefefef, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_FunctionTimer <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** constructor - application main */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_FunctionTimer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// text field to display random delay</span>
			<span style="color: #000000; font-weight: bold;">var</span> tf:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> fmt:<span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Arial&quot;</span>, <span style="color: #cc66cc;">48</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			tf.<span style="color: #0066CC;">setTextFormat</span><span style="color: #66cc66;">&#40;</span>fmt<span style="color: #66cc66;">&#41;</span>;
			tf.<span style="color: #006600;">defaultTextFormat</span> = fmt;
&nbsp;
			addChild<span style="color: #66cc66;">&#40;</span>tf<span style="color: #66cc66;">&#41;</span>;
			tf.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">300</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// timer to demonstrate random delay</span>
			<span style="color: #808080; font-style: italic;">//   minimum: 100ms, maximum: 1000ms</span>
			<span style="color: #000000; font-weight: bold;">var</span> t:Timer = <span style="color: #000000; font-weight: bold;">new</span> FunctionTimer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			FunctionTimer<span style="color: #66cc66;">&#40;</span>t<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addFunction</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					tf.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;delay: &quot;</span> + t.<span style="color: #006600;">delay</span>.<span style="color: #006600;">toFixed</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			t.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/30/extending-randomtimer-functiontimer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random Timer</title>
		<link>http://www.jasonsturges.com/2010/07/30/random-timer/</link>
		<comments>http://www.jasonsturges.com/2010/07/30/random-timer/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 06:01:47 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=124</guid>
		<description><![CDATA[Using the pattern demonstrated by RandomText, let&#8217;s implement Blitting&#8217;s randomized timer class RandomTimer. Inheriting from flash.utils.Timer, RandomTimer dispatches TimerEvent.TIMER and TimerEvent.TIMER_COMPLETE at random delays. Example implementation: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [...]]]></description>
			<content:encoded><![CDATA[<p>Using the pattern demonstrated by RandomText, let&#8217;s implement Blitting&#8217;s randomized timer class RandomTimer.</p>
<p>Inheriting from flash.utils.Timer, RandomTimer dispatches TimerEvent.TIMER and TimerEvent.TIMER_COMPLETE at random delays.</p>
<p>Example implementation:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_RandomTimer</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">time</span>.<span style="color: #006600;">RandomTimer</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">300</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">100</span>, <span style="color: #0066CC;">backgroundColor</span>=0xefefef, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_RandomTimer <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** constructor - application main */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_RandomTimer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// text field to display random delay</span>
			<span style="color: #000000; font-weight: bold;">var</span> tf:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> fmt:<span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Arial&quot;</span>, <span style="color: #cc66cc;">48</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			tf.<span style="color: #0066CC;">setTextFormat</span><span style="color: #66cc66;">&#40;</span>fmt<span style="color: #66cc66;">&#41;</span>;
			tf.<span style="color: #006600;">defaultTextFormat</span> = fmt;
&nbsp;
			addChild<span style="color: #66cc66;">&#40;</span>tf<span style="color: #66cc66;">&#41;</span>;
			tf.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">300</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// timer to demonstrate random delay</span>
			<span style="color: #808080; font-style: italic;">//   minimum: 100ms, maximum: 1000ms</span>
			<span style="color: #000000; font-weight: bold;">var</span> t:Timer = <span style="color: #000000; font-weight: bold;">new</span> RandomTimer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			t.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					tf.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;delay: &quot;</span> + t.<span style="color: #006600;">delay</span>.<span style="color: #006600;">toFixed</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			t.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>We can now see the delay times:</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100" height="100" id="example_ColorPaletteGB"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/random-timer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/random-timer.swf" width="100" height="100"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
<p>From the Blitting SDK, RandomTimer is implemented as:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  RandomTimer</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting.time</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">time</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
&nbsp;
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * &lt;p&gt;
	 * Dispatch timer events at random intervals.
	 * &lt;/p&gt;
	 * &lt;p&gt;
	 * Inherits from native flash.utils.Timer;
	 * therefore, implemented using standard Timer patterns.&lt;br /&gt;
	 * &lt;/p&gt;
	 * &lt;p&gt;
	 * Dispatches native flash.events.TimerEvent
	 * of types TimerEvent.TIMER and TimerEvent.TIMER_COMPLETE.
	 * &lt;/p&gt;
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> RandomTimer <span style="color: #0066CC;">extends</span> Timer
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">// private (base timer)</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _delayMin:<span style="color: #0066CC;">Number</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _delayMax:<span style="color: #0066CC;">Number</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _count:uint = <span style="color: #cc66cc;">0</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _repeatCount:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">// constructor</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * &lt;p&gt;
		 * Create random timer dispatching events within
		 * min / max millisecond values.&lt;br /&gt;
		 * &lt;/p&gt;
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> RandomTimer<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">min</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">max</span>:<span style="color: #0066CC;">Number</span>, repeatCount:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			_delayMin = <span style="color: #0066CC;">min</span>;
			_delayMax = <span style="color: #0066CC;">max</span>;
			delay = nextDelay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_repeatCount = repeatCount;
&nbsp;
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span>delay, repeatCount<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">// lifecycle</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Start the timer.  As the timer runs, random
		 *  delay periods will be set on each timer event.
		 */</span>
		override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			delay = nextDelay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addEventListener<span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, timerHandler<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">super</span>.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Internal private function to determine next delay period. */</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> nextDelay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>_delayMin + <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>_delayMax - _delayMin<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/** Stop the timer. */</span>
		override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			removeEventListener<span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, timerHandler<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">super</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
		<span style="color: #808080; font-style: italic;">// handler</span>
		<span style="color: #808080; font-style: italic;">//------------------------------</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * &lt;p&gt;
		 * Handler on TimerEvent.TIMER, responsible for
		 * changing delay to random value.&lt;br /&gt;
		 * &lt;/p&gt;
		 * &lt;p&gt;
		 * When inheriting from RandomTimer, this override
		 * provides a convenient implementation to timer
		 * event handling without directly assigned.&lt;br /&gt;
		 * &lt;/p&gt;
		 * &lt;p&gt;
		 * Example:&lt;br /&gt;
		 * &lt;code&gt;
		 * public class FunctionTimer extends RandomTimer
		 * {
		 *    private var _functions:Vector.&amp;lt;Function&amp;gt; = new Vector.&amp;lt;Function&amp;gt;();
		 *
		 *    public function addFunction(f:Function):void
		 *    {
		 *       _functions.push(f);
		 *    }
		 *
		 *    override protected function timerHandler(event:TimerEvent):void
		 *    {
		 *       super.timerHandler(event);
		 *
		 *       for each(var f:Function in _functions)
		 *       {
		 *          if(f != null)
		 *             f();
		 *       }
		 *    }
		 * }
		 * &lt;/code&gt;
		 * &lt;/p&gt;
		 */</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> timerHandler<span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_count++;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>_repeatCount <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&#40;</span>_count <span style="color: #66cc66;">&gt;</span>= _repeatCount<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			delay = nextDelay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/30/random-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random Text</title>
		<link>http://www.jasonsturges.com/2010/07/29/random-text/</link>
		<comments>http://www.jasonsturges.com/2010/07/29/random-text/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 04:37:24 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=93</guid>
		<description><![CDATA[Blitting offers many random generation routines. Let&#8217;s start with an example implementation of Blitting&#8217;s RandomText: 1 2 3 import com.jasonsturges.labs.blitting.text.RandomText; &#160; var char:String = RandomText.character&#40;&#41;; Above, a random character is generated and returned as a String. Four character sets are native: Upper Case Alphabet Lower Case Alphabet Numbers Symbols These sets represent two things: Individual [...]]]></description>
			<content:encoded><![CDATA[<p>Blitting offers many random generation routines.</p>
<p>Let&#8217;s start with an example implementation of Blitting&#8217;s RandomText:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">RandomText</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> char:<span style="color: #0066CC;">String</span> = RandomText.<span style="color: #006600;">character</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Above, a random character is generated and returned as a String.  </p>
<p>Four character sets are native:</p>
<ul>
<li>Upper Case Alphabet</li>
<li>Lower Case Alphabet</li>
<li>Numbers</li>
<li>Symbols</li>
</ul>
<p>These sets represent two things:</p>
<ol>
<li>Individual characters concatenated as a String.</li>
<li>Bitwise definition for specifying sets.</li>
</ol>
<p>Let&#8217;s take a look at both as per their application.</p>
<p>Random characters are generated by selecting a character within a String (eg: &#8220;abcdefg&#8221;&#8230;).  Although generally these characters should be unique, duplicate characters increases odds that character will be randomly chosen.</p>
<p>Use <b>RandomText.fromCharacters()</b> to facilitate random character selection from a predetermined list.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// specify a list of possible characters</span>
<span style="color: #000000; font-weight: bold;">var</span> alphabet:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;abcdefghijklmnopqrstuvwxyz&quot;</span>;
<span style="color: #000000; font-weight: bold;">var</span> randChar:<span style="color: #0066CC;">String</span> = RandomText.<span style="color: #006600;">fromCharacters</span><span style="color: #66cc66;">&#40;</span>alphabet<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// increase odds of character</span>
<span style="color: #000000; font-weight: bold;">var</span> randChar:<span style="color: #0066CC;">String</span> = RandomText.<span style="color: #006600;">fromCharacters</span><span style="color: #66cc66;">&#40;</span>RandomText.<span style="color: #006600;">alphabetUpperCase</span> + <span style="color: #ff0000;">&quot;!!!!!???&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>You may specify a String of possible characters, or chose among the four predefined sets:</p>
<ul>
<li>RandomText.alphabetLowerCase</li>
<li>RandomText.alphabetUpperCase</li>
<li>RandomText.numeric</li>
<li>RandomText.symbol</li>
</ul>
<p>Use <b>RandomText.fromCharset()</b> to facilitate random character selection from Blitting&#8217;s sets of characters.  Combine bitwise to include multiple sets.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Upper and lower case letters</span>
RandomText.<span style="color: #006600;">fromCharset</span><span style="color: #66cc66;">&#40;</span>RandomText.<span style="color: #006600;">CHARS_ALPHABET_UPPER_CASE</span> <span style="color: #66cc66;">|</span> RandomText.<span style="color: #006600;">CHARS_ALPHABET_LOWER_CASE</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// Symbols and numbers</span>
RandomText.<span style="color: #006600;">fromCharset</span><span style="color: #66cc66;">&#40;</span>RandomText.<span style="color: #006600;">CHARS_SYMBOL</span> <span style="color: #66cc66;">|</span> RandomText.<span style="color: #006600;">CHARS_NUMERIC</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Chose among the four predefined sets:</p>
<ul>
<li>RandomText.CHARS_ALPHABET_UPPER_CASE</li>
<li>RandomText.CHARS_ALPHABET_LOWER_CASE</li>
<li>RandomText.CHARS_NUMERIC</li>
<li>RandomText.CHARS_SYMBOL</li>
</ul>
<p>Now, tie it all together in a functional example.</p>
<p>Create an application that displays a random character using a timer.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  example_RandomText</span>
<span style="color: #808080; font-style: italic;">//  com.jasonsturges.labs.blitting</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">//  Created by Jason Sturges on 7/30/2010.</span>
<span style="color: #808080; font-style: italic;">//  Copyright Jason Sturges 2010. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">//</span>
package com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #006600;">examples</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">jasonsturges</span>.<span style="color: #006600;">labs</span>.<span style="color: #006600;">blitting</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">RandomText</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #cc66cc;">100</span>, <span style="color: #0066CC;">height</span>=<span style="color: #cc66cc;">100</span>, <span style="color: #0066CC;">backgroundColor</span>=0xefefef, frameRate=<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> example_RandomText <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/** constructor - application main */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> example_RandomText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// text field to display random character</span>
			<span style="color: #000000; font-weight: bold;">var</span> tf:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> fmt:<span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Arial&quot;</span>, <span style="color: #cc66cc;">72</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			tf.<span style="color: #0066CC;">setTextFormat</span><span style="color: #66cc66;">&#40;</span>fmt<span style="color: #66cc66;">&#41;</span>;
			tf.<span style="color: #006600;">defaultTextFormat</span> = fmt;
&nbsp;
			addChild<span style="color: #66cc66;">&#40;</span>tf<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// timer to demonstrate random generation</span>
			<span style="color: #000000; font-weight: bold;">var</span> t:Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			t.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					tf.<span style="color: #0066CC;">text</span> = RandomText.<span style="color: #006600;">fromCharset</span><span style="color: #66cc66;">&#40;</span>RandomText.<span style="color: #006600;">CHARS_ALPHABET_LOWER_CASE</span> <span style="color: #66cc66;">|</span> RandomText.<span style="color: #006600;">CHARS_ALPHABET_UPPER_CASE</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			t.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>&#8230;and we get:</p>
<p>            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100" height="100" id="example_RandomText"><param name="movie" value="http://www.jasonsturges.com/labs/blitting/examples/random-text.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--[if !IE]>&#8211;><br />
                <object type="application/x-shockwave-flash" data="http://www.jasonsturges.com/labs/blitting/examples/random-text.swf" width="100" height="100"><param name="quality" value="high" /><param name="bgcolor" value="#efefef" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><!--<![endif]--><br />
                <!--[if gte IE 6]>&#8211;></p>
<p>
                		Either scripts and active content are not permitted to run or Adobe Flash Player version<br />
                		10.0.0 or greater is not installed.
                	</p>
<p>                <!--<![endif]--><br />
                    <a href="http://www.adobe.com/go/getflashplayer"><br />
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /><br />
                    </a><br />
                <!--[if !IE]>&#8211;><br />
                </object><br />
                <!--<![endif]--><br />
            </object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/29/random-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blitting SDK</title>
		<link>http://www.jasonsturges.com/2010/07/28/blitting-sdk/</link>
		<comments>http://www.jasonsturges.com/2010/07/28/blitting-sdk/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 05:59:22 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[blitting]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[swc]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=75</guid>
		<description><![CDATA[Promoting functional units from my private development in to a new framework, I&#8217;m introducing a new API named &#8220;Blitting&#8221;. Distributed as an ActionScript 3.0 SWC, this library is focused in bit BLIT, rendering, layout, double and multiple buffering while maintaing performance oriented design. Performance metrics will be available in a soon to be released Profiler [...]]]></description>
			<content:encoded><![CDATA[<p>Promoting functional units from my private development in to a new framework, I&#8217;m introducing a new API named &#8220;Blitting&#8221;.</p>
<p>Distributed as an ActionScript 3.0 SWC, this library is focused in bit BLIT, rendering, layout, double and multiple buffering while maintaing performance oriented design.</p>
<p>Performance metrics will be available in a soon to be released Profiler package, and a goal of this blog will be case studies in ActionScript.</p>
<p>Currently extraordinarily alpha, expect progress in an organic manner.</p>
<p>Documentation available at:<br />
<a href="http://www.jasonsturges.com/labs/blitting/asdoc"> http://www.jasonsturges.com/labs/blitting/asdoc</a></p>
<p>Binary ActionScript 3.0 SWC at:<br />
<a href="http://www.jasonsturges.com/labs/blitting/bin/blitting.swc"> http://www.jasonsturges.com/labs/blitting/bin/blitting.swc</a></p>
<p>Google Code at:<br />
<a href="http://code.google.com/p/blitting/">http://code.google.com/p/blitting/</a></p>
<p>SVN Checkout via Google Code at:<br />
svn checkout http://blitting.googlecode.com/svn/trunk/ blitting-read-only</p>
<p>For informational requests regarding commercial proprietary development and implementation, contact me directly at: jason@jasonsturges.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/28/blitting-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hello world!</title>
		<link>http://www.jasonsturges.com/2010/07/27/hello-world/</link>
		<comments>http://www.jasonsturges.com/2010/07/27/hello-world/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 05:01:26 +0000</pubDate>
		<dc:creator>Jason Sturges</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.jasonsturges.com/?p=1</guid>
		<description><![CDATA[0100100101110100 0010011101110011 0010000001100001 0010000001100010 0110010101100001 0111010101110100 0110100101100110 0111010101101100 0010000001100100 0110000101111001 0010000001101001 0110111000100000 0111010001101000 0110100101110011 0010000001101110 0110010101101001 0110011101101000 0110001001101111 0111001001101000 0110111101101111 0110010000101100 0010000000001101 0000101001000001 0010000001100010 0110010101100001 0111010101110100 0110100101100110 0111010101101100 0010000001100100 0110000101111001 0010000001100110 0110111101110010 0010000001100001 0010000001101110 0110010101101001 0110011101101000 0110001001101111 0111001000101100 0010000000001101 0000101001010111 0110111101110101 0110110001100100 0010000001111001 0110111101110101 0010000001100010 0110010100100000 0110110101101001 0110111001100101 0011111100100000 0000110100001010 0100001101101111 0111010101101100 0110010000100000 0111100101101111 0111010100100000 [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
0100100101110100 0010011101110011<br />
0010000001100001 0010000001100010<br />
0110010101100001 0111010101110100<br />
0110100101100110 0111010101101100<br />
0010000001100100 0110000101111001<br />
0010000001101001 0110111000100000<br />
0111010001101000 0110100101110011<br />
0010000001101110 0110010101101001<br />
0110011101101000 0110001001101111<br />
0111001001101000 0110111101101111<br />
0110010000101100 0010000000001101<br />
0000101001000001 0010000001100010<br />
0110010101100001 0111010101110100<br />
0110100101100110 0111010101101100<br />
0010000001100100 0110000101111001<br />
0010000001100110 0110111101110010<br />
0010000001100001 0010000001101110<br />
0110010101101001 0110011101101000<br />
0110001001101111 0111001000101100<br />
0010000000001101 0000101001010111<br />
0110111101110101 0110110001100100<br />
0010000001111001 0110111101110101<br />
0010000001100010 0110010100100000<br />
0110110101101001 0110111001100101<br />
0011111100100000 0000110100001010<br />
0100001101101111 0111010101101100<br />
0110010000100000 0111100101101111<br />
0111010100100000 0110001001100101<br />
0010000001101101 0110100101101110<br />
0110010100111111</code><br />
<span id="more-1"></span><br />
welcome</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonsturges.com/2010/07/27/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
