<?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>Cowburn &#187; Projects</title>
	<atom:link href="http://cowburn.info/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://cowburn.info</link>
	<description>Online storage depot for Peter Cowburn</description>
	<lastBuildDate>Sat, 17 Mar 2012 13:12:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Time-based Twitter Theme</title>
		<link>http://cowburn.info/2009/03/18/time-based-twitter-theme/</link>
		<comments>http://cowburn.info/2009/03/18/time-based-twitter-theme/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 16:26:55 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[colourful]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://cowburn.info/?p=134</guid>
		<description><![CDATA[Early this morning, I got the urge to change the twitter theme for my profile. There&#8217;s nothing strange in that, except perhaps that acting on urges seems to be common for me recently. I was bored of the normal fancy-graphic-background-on-the-left style of themes and wanted to go simple but with a twist. Instead of the [...]]]></description>
			<content:encoded><![CDATA[<p>Early this morning, I got the urge to change the twitter theme for my profile. There&#8217;s nothing strange in that, except perhaps that acting on urges seems to be common for me recently.</p>
<p>I was bored of the normal fancy-graphic-background-on-the-left style of themes and wanted to go simple but with a twist. Instead of the usual, something unusual was the order of the day.  Quite what, I didn&#8217;t really now.<span id="more-134"></span></p>
<p><img src="http://cowburn.info/wp-content/uploads/2009/03/twitter-colour.gif" alt="Colourful Twitter" title="Colourful Twitter" width="580" height="106" class="aligncenter size-full wp-image-136" /></p>
<h3>Simplify</h3>
<p>The first decision was really easy: get rid of my previous background image and create a bright colour scheme for the page.  The decision was easy, but the execution wasn&#8217;t so. I just couldn&#8217;t settle for any one favourite colour to base my new theme off of!  However, this gave me an idea.</p>
<h3>Multiply</h3>
<p>The idea was, instead of having one, fixed colour scheme why not have many? Bingo. The thought-process went through selecting a few colour schemes that I liked most which ended up being one for each colour of the rainbow (might as well cover everything). By this stage, I&#8217;d also decided that it would be cool to change the theme at some regular time interval (even toying with using day/night themes much earlier on).    Running through a cycle of colours lasting 24 hours might be nice, except that I don&#8217;t really visit the twitter website evenly throughout any 24 hour period—most of my twitter-visiting is during &#8220;working hours&#8221; and the evening.  I just wouldn&#8217;t see the colours during the night, which would be a waste of colourfulness! </p>
<p>Instead, I opted for a 1-hour cycle to keep things fresh whenever I visit twitter (or anyone else visits <a href="http://twitter.com/cowburn" rel="external me">@cowburn</a>, should they feel the urge).  So, six pretty colour schemes over the course of an hour it was. For a few minutes at least.  Changing my theme colours every 10 minutes ended up being too radical: the jump from one page load to the next too great. The transitions needed to be smoothed out!  And this is when everything started falling into place.</p>
<p>Why not change the colour scheme once a minute, cycling through the six main colour schemes over the course of an hour? This meant creating intermediate colour schemes each melting into the next one.  Creating 60 individual colour schemes was far too tedious to do by hand, so I wrote a script to automate the process.</p>
<p>Once the colour schemes were generated, the changes between main schemes were nice and gentle (see the video) and ready to be pushed to my twitter profile.   So, once per minute a little PHP script talks to the Twitter API and updates my profile colours with the scheme for that individual minute ready for the world (or just me) to see. </p>
<h3>Demonstration</h3>
<p>Because you might not have an hour to waste, clicking on my profile page to see the colours change, here&#8217;s a quickie video showing what it&#8217;s like.</p>
<p><a name="video"></a><embed src="http://blip.tv/play/AfSHJ5SxGw" type="application/x-shockwave-flash" width="580" height="410" allowscriptaccess="always" allowfullscreen="true"></embed><br />
(Feed readers, <a href="http://cowburn.info/2009/03/18/time-based-twitter-theme/ #video">click here</a>)</p>
<p>Don&#8217;t forget to follow me <a href="http://twitter.com/cowburn">@cowburn</a>, I don&#8217;t update very often!</p>
]]></content:encoded>
			<wfw:commentRss>http://cowburn.info/2009/03/18/time-based-twitter-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

