<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>graphics &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/graphics/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Mon, 10 Nov 2025 06:08:33 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>graphics &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Dark Mode and Transparent Images]]></title>
		<link>https://shkspr.mobi/blog/2020/05/dark-mode-and-transparent-images/</link>
					<comments>https://shkspr.mobi/blog/2020/05/dark-mode-and-transparent-images/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 22 May 2020 11:30:57 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[a11y]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[usability]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=35026</guid>

					<description><![CDATA[Dark Mode is the new cool. Apps which automatically switch to an eye-friendly palette when lighting conditions are poor. Nifty!  Most of the time, it&#039;s as simple as making the text a lightish colour, and the background a darkish colour. But all that fails when you use transparencies in images.  Here&#039;s a quick example. Using the GitHub app in dark mode, I visited a repo which used a transparent…]]></description>
										<content:encoded><![CDATA[<p>Dark Mode is the new cool. Apps which automatically switch to an eye-friendly palette when lighting conditions are poor. Nifty!</p>

<p>Most of the time, it's as simple as making the text a lightish colour, and the background a darkish colour. But all that fails when you use transparencies in images.</p>

<p>Here's a quick example. Using the GitHub app in dark mode, I visited a repo which used a transparent image as an illustration:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/05/Hard-to-read-image.png" alt="A Hhrd to read image. The text is black, but so is most of the background. Bits have a white background." width="665" height="582" class="aligncenter size-full wp-image-35028">

<p>Yikes! I can't read most of that text, even if I whack up the brightness on my screen.</p>

<p>Here's what the image looks like in an editor:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/05/Checkerboard-image.png" alt="Larger view of the image. Bits of the background are transparent." width="1387" height="798" class="aligncenter size-full wp-image-35029">

<p>As you can see, the majority of the background is transparent - indicated by the <a href="https://twitter.com/edent/status/1259494619483643906">traditional checkerboard pattern</a> - with occasional blocks having a background colour.</p>

<p>Background transparency is be great if you can <em>guarantee</em> the background colour! But the web is wonderful; browsers are intended to be the user's agents. This means you can substitute the page's design with your own. Change fonts, make things easier to read, flip colours, whatever you want.</p>

<p>To account for dark mode - or any user changed interface - you have two main options:</p>

<ol>
<li>Remove transparencies</li>
<li>Stroke outline</li>
</ol>

<p>The first is obvious - just put in a background colour. The second is a little harder to explain.</p>

<p>Text can have a colour - <code>fill:#000</code> paints the text black.
Text can also have an <em>outline</em> - known as a stroke. <code>stroke: #fff; stroke-width:2px;</code> paints a 2 pixel white border around the text.</p>

<p>Here's an example SVG (I've mocked up the transparent background):</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/05/Text%20effects.svg" alt="" width="768" class="aligncenter size-full wp-image-35029">

<p>My suggestion is - put a high-contrast stroke around any object where you expect the background colour to be shown through a transparency.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=35026&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/05/dark-mode-and-transparent-images/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[This SVG always shows today's date]]></title>
		<link>https://shkspr.mobi/blog/2018/02/this-svg-always-shows-todays-date/</link>
					<comments>https://shkspr.mobi/blog/2018/02/this-svg-always-shows-todays-date/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 25 Feb 2018 16:07:13 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[svg]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=29122</guid>

					<description><![CDATA[For my contact page, I wanted a generic calendar icon to let people view my diary.  Calendar icons are almost always a skeuomorph of a paper calendar, but I wondered if I could make it slightly more useful by creating a dynamic icon.  Here it is, an SVG calendar which always display&#039;s today&#039;s date:    The background image is derived from the Twitter TweMoji Calendar icon - CC-BY.  Text support in …]]></description>
										<content:encoded><![CDATA[<p>For <a href="https://edent.tel/">my contact page</a>, I wanted a generic calendar icon to let people view my diary.  Calendar icons are almost always a skeuomorph of a paper calendar, but I wondered if I could make it slightly more useful by creating a <em>dynamic</em> icon.</p>

<p>Here it is, <a href="https://shkspr.mobi/svg/calendar.svg">an SVG calendar which always display's today's date</a>:</p>

<iframe style="background: #fff; border:none;" src="https://shkspr.mobi/svg/calendar.svg" width="256px" height="256px"></iframe>

<p><small>The background image is derived from the <a href="https://github.com/twitter/twemoji/blob/gh-pages/2/svg/1f4c5.svg">Twitter TweMoji Calendar icon</a> - CC-BY.</small></p>

<p>Text support in SVG is a little awkward, so let me explain how I did this.</p>

<p>SVG supports JavaScript. This will run as soon as the image is loaded.</p>

<pre><code class="language-svg">&lt;svg onload="init(evt)" xmlns="http://www.w3.org/2000/svg"
aria-label="Calendar" role="img" viewBox="0 0 512 512"&gt;
</code></pre>

<p>Next step is to get the various date strings. I'm using the <code>en-GB</code> locale as that's where I'm based.</p>

<pre><code class="language-svg">&lt;script type="text/ecmascript"&gt;&lt;![CDATA[
function init(evt) {
  var time = new Date();
  var locale = "en-gb";
</code></pre>

<p>I want to display something like "Sunday 25 FEB" - the locale options allow for short and long names. So you could have "SUN 25 February".</p>

<pre><code class="language-js">  var DD   = time.getDate();
  var DDDD = time.toLocaleString(locale, {weekday: "long"});
  var MMM = time.toLocaleString(locale,  {month:   "short"});
</code></pre>

<p>Finally, we need to add the text on to the image.</p>

<pre><code class="language-js">  var svgDocument = evt.target.ownerDocument;

  var dayNode = svgDocument.createTextNode(DD);
  svgDocument.getElementById("day").appendChild(dayNode);

  var weekdayNode = svgDocument.createTextNode(DDDD);
  svgDocument.getElementById("weekday").appendChild(weekdayNode);

  var monthNode = svgDocument.createTextNode(MMM.toUpperCase());
  svgDocument.getElementById("month").appendChild(monthNode);

}
]]&gt;&lt;/script&gt;
</code></pre>

<p>Text positioning is relatively simplistic.  An X &amp; Y position which is anchored to the <em>bottom</em> of the text - remember that letters with descenders like <code>g</code> will extend beyond the bottom of the Y co-ordinate.  This is also where we set the colour of the text, its size, and a font.</p>

<p>A monospace font makes it easier to predict the layout.</p>

<pre><code class="language-svg">&lt;text id="month"
  x="32" 
  y="164" 
  fill="#fff" 
  font-family="monospace"
  font-size="140px"
  style="text-anchor: left"&gt;&lt;/text&gt;
</code></pre>

<p>A word on anchoring.  To centre the anchor, use <code>style="text-anchor: middle"</code></p>

<p>A quick test shows that this works on all desktop browsers and Android browsers. I've not tested on iPhones or anything more exotic.</p>

<p>Enjoy!</p>

<hr>

<ul>
<li><a href="https://github.com/edent/Dynamic-SVG-Calendar-Icon">GitHub repo</a></li>
<li><a href="https://news.ycombinator.com/item?id=16459550">Discussion on HackerNews</a></li>
</ul>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=29122&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2018/02/this-svg-always-shows-todays-date/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Are Designers Crazy?]]></title>
		<link>https://shkspr.mobi/blog/2013/01/are-designers-crazy/</link>
					<comments>https://shkspr.mobi/blog/2013/01/are-designers-crazy/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 03 Jan 2013 12:00:23 +0000</pubDate>
				<category><![CDATA[usability]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[mobile]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=7250</guid>

					<description><![CDATA[...or do I just need new glasses?  I&#039;m not a graphic designer. I find it hard to get into the mindset of excellence through beauty.  I understand user flow, interactions, happy paths, delighting the user, humane design, and so on - but when it comes to the art of making something look nice I&#039;m all at sea. I understand that, as Aral Balkan so perfectly puts it, design is not veneer - but that…]]></description>
										<content:encoded><![CDATA[<p>...or do I just need new glasses?</p>

<p>I'm not a graphic designer. I find it hard to get into the mindset of excellence through beauty.</p>

<p>I understand user flow, interactions, happy paths, delighting the user, humane design, and so on - but when it comes to the art of making something <strong>look nice</strong> I'm all at sea. I understand that, as Aral Balkan so perfectly puts it, <a href="http://aralbalkan.com/notes/design-is-not-veneer/">design is not veneer</a> - but that doesn't stop my confusion.</p>

<p>This is a failing of mine - one which I'm trying to rectify - but recently I've had the sneaking suspicion that <em>some</em> designers may have a touch of <a href="http://en.wikipedia.org/wiki/The_Emperor%27s_New_Clothes">"Emperor's New Clothes"</a> about them.</p>

<p>I'm going to pick on two examples. I don't think the people behind them are bad or wrong - I just don't understand how their eyes and brains work :-)</p>

<h2 id="a-question-of-scale"><a href="https://shkspr.mobi/blog/2013/01/are-designers-crazy/#a-question-of-scale">A Question of Scale</a></h2>

<p><a href="http://jackg.org/">Jack Groetzinger</a> writes about the challenges faced when <a href="http://jackg.org/iphone-design">trying to scale down images</a> for different iPhone models.</p>

<blockquote>My first attempt at turning one of my 2x comps into a 1x version was to just decrease the image size in Photoshop. That was naive. Some elements don’t scale well when simply downsized; they require special attention.</blockquote>

<p>Here is the image in question (used with kind permission):</p>

<p><a href="https://shkspr.mobi/blog/wp-content/uploads/2013/01/Screenshot-Comparison.png"><img class="aligncenter  wp-image-7258" alt="Screenshot Comparison" src="https://shkspr.mobi/blog/wp-content/uploads/2013/01/Screenshot-Comparison.png" width="657" height="482"></a>
(Click for full sized)</p>

<p>I know I'm not a designer - but I<em> simply can't see any difference here</em>. Ok, one button is orange - but that's it. There's nothing here which screams "terrible design!" at me. I'm looking and don't understand what "special attention" either would need. Were that to be presented to me as a user, I'd know where to click and not be distracted by inappropriate design.
As a product manager, I'd ship either.</p>

<p>I've deliberately removed the naming on the screenshots - can <em>you</em> tell which contains the elements which "don't scale well"?</p>

<p>To better understand this, I've created an animation to show the difference between the two screenshots. This simply flips between the two images, there are no fades or anything else.</p>

<img class="aligncenter size-full wp-image-7253" alt="Design Difference" src="https://shkspr.mobi/blog/wp-content/uploads/2013/01/Design-Difference.gif" width="327" height="486">

<p>Ok... Now I see some differences. On one, the buttons are slightly larger, the colours slightly more nuanced, the shading is subtly different. If I zoom to an extreme level, the font on "ebay" in slightly smoother.</p>

<p>I get that there is a strong need for design. I understand the need for a clear and unambiguous environment. The desire for beauty is strong with some people - and I appreciate that.</p>

<p>But here's the thing. That design is going to be held around 50cm from the user's eyes, drawn on a screen which is caked in sweat and grime, which is reflecting the ambient light in the room, and is - in all likelihood - cracked.</p>

<p>Worrying about the exact scaling of a button, and the nuances of shadowing is what we in computer science would call "<a href="http://en.wikiquote.org/wiki/Donald_Knuth#Computer_Programming_as_an_Art_.281974.29">premature optimisation</a>".</p>

<h2 id="how-soon-is-now"><a href="https://shkspr.mobi/blog/2013/01/are-designers-crazy/#how-soon-is-now">How Soon Is Now?</a></h2>

<p>If a developer comes to you and says she can shave 5ms of every transaction, you have to decide whether this is a suitable use of her time, and whether it will cause problems later on.</p>

<p>For example, if this transaction is 5ms per user - it's unlikely to be noticed. If it's a back end process used millions of times, that optimisation may be worth it.</p>

<p>If rewriting that code to make it more efficient comes at the expense of readability and reliability, a call has to be made on where you want to make sacrifices.</p>

<p>Finally, if it will take her 3 weeks to make the optimisation - how long will it take to recoup that investment?</p>

<p>With design, it's no different. Will users notice that images aren't a bespoke designed for their platform? Will they care? Will you have to create an entirely new workflow to generate images specific to one platform? How will you manage image assets - especially when they need to be updated?</p>

<p>In fairness, Jack realises that this is a step too far and says:</p>

<blockquote>Perhaps it isn't worth optimizing for 1x. [...] you're spending a lot of time catering to small group of users. The crudely downsized version isn’t pixel-perfect, but it’s still usable.</blockquote>

<p>Again, I'm not trying to mock Jack or any other designers. I'm just trying to understand what drives the innate desire to be "pixel-perfect".</p>

<p>Ultimately, the question I'm asking is - does this even matter?</p>

<h2 id="for-you-blue"><a href="https://shkspr.mobi/blog/2013/01/are-designers-crazy/#for-you-blue">For You Blue</a></h2>

<p>There is a (possibly apocryphal) story about Google engineers trying to think like designers.</p>

<blockquote>Google is stuffed full of people who just love to experiment on its users. For instance, Google Mail uses a very slightly different blue for links than the main search page. Its engineers wondered: would that change the ratio of clickthroughs? Is there an "ideal" blue that encourages clicks? To find out, incoming users were randomly assigned between 40 different shades of links – from blue-with-green-ish to blue-with-blue-ish.
<a href="http://www.guardian.co.uk/technology/2009/jul/08/google-search-marissa-mayer">The Guardian, Wednesday 8 July 2009 18.00 BST</a></blockquote>

<p>Here we have - supposedly - a quantifiable metric for how design impacts performance. If you have billions of interactions, and you can see a statistically significant uptake between designs, then <em>maybe</em> it is worth worrying about every last pixel.</p>

<p>In today's "ship it and see" environment, we may not have the luxury of thorough testing before launch. Even after launch, there are hundreds of large changes and features which could improve usability before we start to worry about whether <span style="color: #2a5db0;">#2A5DB0</span> beats <span style="color: #2a5db1;">#2A5DB1</span></p>

<h2 id="crazy-or-misunderstood"><a href="https://shkspr.mobi/blog/2013/01/are-designers-crazy/#crazy-or-misunderstood">Crazy or Misunderstood</a></h2>

<p>Musically, I'm tone deaf. I just can't tell one note from another. That sucks.
Graphic design wise, it appears that I'm equally out of luck.</p>

<p>I know that most developers are not like their users. I am deeply aware that while I'll happily use a website in Lynx, many users need and appreciate beautiful design.</p>

<p>I'm I the crazy one? Is there such an apparent difference between the above screenshots that I should go out and buy a guide dog now?</p>

<p>Does determining the exact shading on a hyperlink sound like a good use of resources when compared to all of Google's other problems?</p>

<p>My brain doesn't work like that of a designer - I know that. But should I even <em>try</em> to think like them?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=7250&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2013/01/are-designers-crazy/feed/</wfw:commentRss>
			<slash:comments>81</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Police And Blue Boxes]]></title>
		<link>https://shkspr.mobi/blog/2011/11/police-and-blue-boxes/</link>
					<comments>https://shkspr.mobi/blog/2011/11/police-and-blue-boxes/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 11 Nov 2011 08:00:56 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[9nov]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<category><![CDATA[nov9]]></category>
		<category><![CDATA[police]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=4704</guid>

					<description><![CDATA[The journalist Shiv Malik took a rather intriguing photo at the recent student protests.    It appears to show a group of police officers gathered around a blue box.  No one seems to know what the box is for. I&#039;m sure it&#039;s got a rather prosaic function - but that doesn&#039;t stop the speculation!  As soon I saw it, I could think of only one thing; chroma-key! (Or Colour Separation Overlay if you&#039;re…]]></description>
										<content:encoded><![CDATA[<p>The journalist <a href="http://www.theguardian.com/profile/shiv-malik">Shiv Malik</a> took a rather intriguing photo at the recent student protests.</p>

<p><a target="_blank" title="yfrog.com - Image And Video Hosting" href="http://yfrog.com/o0iuwbuj"><img src="http://a.yfrog.com/img864/6196/iuwbu.th.jpg" border="0"></a></p>

<p>It appears to show a group of police officers gathered around a blue box.  No one seems to know what the box is for. I'm sure it's got a rather prosaic function - but that doesn't stop the speculation!</p>

<p>As soon I saw it, I could think of only one thing; <a href="http://en.wikipedia.org/wiki/Chroma_key">chroma-key</a>! (Or <a href="http://tardis.wikia.com/wiki/CSO">Colour Separation Overlay</a> if you're the BBC).  It's more commonly known as "blue screen".  It's the special effect which allows you to remove the background and replace it with something else.</p>

<p>So, using my rather unimpressive GiMP skills, I created this version of the image with the blue box removed.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2011/11/blueboxes-300x225.png" alt="" title="blueboxes transparent" width="300" height="225" class="aligncenter size-medium wp-image-4713"></p>

<p><a href="http://inqmobile.com">Mike Stead</a> created this quick image.
<a target="_blank" title="yfrog.com - Image And Video Hosting" href="http://yfrog.com/kh60789761p"><img src="http://a.yfrog.com/img737/5643/60789761.png" border="0"></a></p>

<p>And I produced this (rather obvious) effort.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2011/11/tardis.jpg" alt="" title="tardis" width="480" height="323" class="aligncenter size-full wp-image-4705">

<p>You can <a href="http://yfrog.com/o0iuwbuj">download the original image</a> or <a href="https://shkspr.mobi/blog/wp-content/uploads/2011/11/chroma-key.png">my alteration with the transparency</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=4704&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2011/11/police-and-blue-boxes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Hiding Space Invaders In QR Codes]]></title>
		<link>https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/</link>
					<comments>https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 10 Nov 2010 08:32:47 +0000</pubDate>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[qr]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<category><![CDATA[QR Codes]]></category>
		<category><![CDATA[space invaders]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=2835</guid>

					<description><![CDATA[One of the lovely aspects of QR codes is the variable levels of error correction built in.  On even the most basic code you can obscure or deform up to 7% of the code and most readers will still decode it.  This leads us in to the amusing territory of &#34;hiding&#34; human readable data in the code.  I say &#34;hiding&#34; because we are hiding it from the scanner - not from the human.  One of the more famous e…]]></description>
										<content:encoded><![CDATA[<p>One of the lovely aspects of QR codes is the variable levels of error correction built in.&nbsp; On even the most basic code you can obscure or deform up to 7% of the code and most readers will still decode it.</p>

<p>This leads us in to the amusing territory of "hiding" human readable data in the code.&nbsp; I say "hiding" because we are hiding it from the scanner - not from the human.</p>

<p>One of the more famous examples of this is <a href="https://web.archive.org/web/20101228174113/https://whomwah.com/2008/03/12/more-fun-with-qr-codes-and-the-bbc-logo/">Duncan Robertson's BBC logo</a>.</p>

<img class="aligncenter size-full wp-image-2836" title="BBC Logo in a QR Code" src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/2697480521_f30226a75d_t.jpg" alt="BBC Logo in a QR Code" width="100" height="100">

<p>What works particularly well is the fact that the BBC logo is already black and white, and fairly blocky.</p>

<h2 id="aliens"><a href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#aliens">Aliens!</a></h2>

<p>After <a href="https://shkspr.mobi/blog/2010/11/invasion-paris/">my sojourn alien hunting in Paris</a>, I realised that there is another blocky character which most people will recognise - the humble Space Invader!</p>

<p>In this first code, I've made the Invader small and hidden her in some blank space.
<a href="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader1.png"><img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader1.png" alt="Hidden Space Invader" title="Hidden Space Invader" width="164" height="164" class="aligncenter size-full wp-image-2849"></a>
Because she's around the same size as the surrounding pixels, any error she generates is cancelled out.</p>

<p>We can also use Duncan's technique and obscure part of the code.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader2.png" alt="Space Invader" title="Space Invader" width="164" height="164" class="aligncenter size-full wp-image-2850"></p>

<h2 id="how-not-to-be-seen"><a href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#how-not-to-be-seen">How Not To Be Seen</a></h2>

<p>While the boys of Monty Python can tell you <a href="https://www.youtube.com/watch?v=ifmRgQX82O4">how not to be seen</a>, for computer vision, it's rather different.</p>

<p>Essentially, what most QR scanners do is look at a <a href="http://en.wikipedia.org/wiki/Grayscale">greyscale</a> view of the image in front of them.&nbsp; The lighter the colour, the more likely the optical recognition algorithm is to see it as "white".&nbsp; This allows you to put dark coloured QR codes on to a light coloured background and still have them read.</p>

<p>So, in theory, we could fill up every pixel of white space with a different light colour and still be perfectly readable.</p>

<p>In this example, I've filled in some of the white space with light green.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader3.png" alt="Space Invader hidden in whitespace" title="Space Invader hidden in whitespace" width="164" height="164" class="aligncenter size-full wp-image-2851">
When seen in greyscale, the green is discarded and no extra error is introduced.</p>

<h2 id="other-examples"><a href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#other-examples">Other Examples</a></h2>

<p>Optiscan have gone a whole lot further and coloured in the entire code
<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/Alien-QR-Code.jpg" alt="QR Code coloured in to look like an alien." width="400" height="400" class="aligncenter size-full wp-image-33556"></p>

<p>They claim that their app will quite happily read this code.  As it's iPhone only, I wasn't able to verify - but as a rule, increasing the colour complexity will reduce the chances of a phone being able to successfully read your code.  It's a fine balance between readability and aesthetic improvement.</p>

<p>The excellent <a href="http://www.qrmonkey.com/">QR Monkey</a> has a <a href="https://web.archive.org/web/20100911180729/http://www.qrmonkey.com/2010/03/16/518/">blog post detailing several different techniques for prettifying your QR Codes</a>.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/QR-Monkey.png" alt="QR Monkey" title="QR Monkey" width="300" height="300" class="aligncenter size-full wp-image-2876">

<p>Another example of how far you can go is this <a href="https://web.archive.org/web/20101026152146/http://rubistudios.com/blog/?p=409">QR Quilt from Rubi Studios</a>.
<a href="http://rubistudios.com/blog/?p=409"><img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/QR-quiltweb2-297x300.jpg" alt="QR Quilt" title="QR Quilt" width="297" height="300" class="aligncenter size-medium wp-image-2877"></a></p>

<p>In short - you can go pretty wild with your QR designs.  Just remember to up the error correction and make sure that contrast between the colours you use is sufficiently high for most scanners.  When in doubt - test!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=2835&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
