Putting Colour into QR Codes

QR codes. Even if you don't know what they are, you'll have seen one. They're those weird square barcodes you find on product packaging. Well, mainly on product packaging. But they're all over the place. Plenty of Twitter users have them set as their profile picture.

Here's one that decodes as a bit.ly link to this blog:

It's not very fancy, is it? You'd have a hard time making it into a compelling brand identity, let's put it that way. So what can we do to overcome this horrible black-and-white world, while still cashing in on the QR trend?

Well, stop thinking so black-and-white for a start. A QR code isn't so much a black-and-white shape as a contrast map. It needs dark bits in the right places and light bits everywhere else, but that's all. It doesn't have to be pure black on pure white.

So, let's try something. Here's a profile picture I use from time to time - it's ideal for this project because its sepia effect makes it quite dark - and importantly, means there are no blocks of white.

What we're going to do is easy enough - we're gonna map this image on to the black areas of the QR code above. If you have any image editing software with a half-decent list of features, you should be able to do this.

In my case I'm using Photoshop.
  • Open the two images and crop/stretch them to the right size

  • Use the magic wand tool to select only the black areas of the QR code

  • Select the entire profile pic

  • On the Edit menu, choose 'Paste Into'
And that's it. The colour information from your profile picture should paste into the black of the QR code. You'll be left with something like this:

Does it work? Of course it does - try it here. It decodes as http://bit.ly/kf2jEf?r=qr - the bit.ly link to this blog with a QR reference on the end for bit.ly's own tracking.

Missing too much colour data? We can go a step further. Simply repeat the process, but this time lighten your profile picture first and then paste it into the white space of your QR code.

As long as you leave sufficient contrast between the light and dark areas of the code, it should still work - see the image below. Tweak it until you get the right level of contrast - such that the QR code still renders as the desired link, but the image shows through the 'window' that the QR pattern creates.

Once again, the proof that this works can be found here.

As the great Neil Buchanan would say, try it yourself - and see through the black-and-white problem of whether to have a profile pic or a QR code. You can have both.