Hacking Microsoft Tag’s HCCB: works in monochrome too!


Microsoft Tags, technically known as High Capacity Color Barcodes, might not be so worthless in print after all. Following yesterday’s announcement at CES 2009, a lot of mostly criticism has arisen over Microsoft’s next-generation 2D barcodes, one of which was its dependency on color. However, my experiments prove it to be not as dependent as you think.


On the surface, what appears to give HCCB’s its technical superiority is color, as the name might suggest. Using different colors, you could store 1 byte of data in less than half the space it would have taken a black-and-white matrix code. But, the secret is not color, at least not in the technical sense.

You see (pun), color is a combination of hue, saturation and brightness. What I’ve found is that the data is not stored in hue or saturation, but brightness alone. Having said that, there is a secondary dependency on color for the technology to work. If that doesn’t make sense, have a look at the following example.

Here is a simple “Hello world” tag I’ve created. On the right, I used Photoshop’s black and white adjustments (settings R:100,Y:100,G:0,C:33,B:0,M:66) to strip out all the hue and saturation information to be left with an image purely composed by differences in brightness.


Now if you took your Tag Reader and tried to capture the black-and-white tag, it won’t work. I don’t know why, but it just wouldn’t. What comes next was stumbled upon by my luck. If you focus your camera on something else in the room, then back to the tag as quickly as possible, it will actually work. (If it doesn’t for you, you’re just going to have to trust me.)

The phenomenon stumbled me at first but soon became rather obvious. Every camera tries to take the perfect photo by automatically adjusting for color balance – the setting which either makes photos look warm or cool. By focusing the camera away, it changes the color balance to suit that area, and if you shift back the camera back really fast, it won’t have time to readjust the color balance and so it inaccurately tints the otherwise black-and-white tag with either a orange or blue hue.

With that in mind, it means that all you need is a single hue of color (monochrome) to make it work. Try these. It should work every time.


Sure, it still means that HCCBs don’t work in a pure black-and-white situation like a newspaper but I don’t think in this day and age single-color printing is too much to ask for.

Update: Even subtle gradients and photo-based backgrounds will work too.


43 insightful thoughts

  1. Great post…good to see they’re even more useful than originally thought! I’ve been palying with Tags and I can see a bright future for them 🙂

  2. Nice work Long. Although only the orange one works after aiming at the blue for me intermittently. The colour one works incredibly quickly everytime.

    I actually don’t agree with the criticism about access to printing. I challenge everyone to do a quick test, count how many print articles (billboard ads, posters, magazines, newspapers, flyers) they read in a day. Then count how many are purely black and white – I rather suspect the latter number will be single digits in a given day.

    Think of the application of this. Stickers, business cards, box covers, billboards. All of them commonly printed in colour nowadays.


  3. I can see uses in non-colour newsprint; where levels-of-grey (% of K) are printed rather than CMY.

    Thanks for thinking of this, then testing your theory out, Long!

  4. interestingly enough, the black and white tag just worked on my iphone, i tried in a really dark room, so this might be why.

  5. Fantastic new technology, does anyone know if this will be available for developers? I.e. could I print the tags and include the Recognition in my own mobile software applications?

    An example of what we are trying to do is tag objects, we have tried printing barcodes and taking a picture and trying to recognise the barcode but it just doesn;t work, the images are not good enough to pick up a barcode.

  6. I think this technology is awesome. Reminds me of something before, “CueCat” or the sort. Was a barcode scanner you could attach to your PC, (in the shape of a cat! Complemented your mouse, no?) and by scanning barcodes on products, it would take you to websites for them. Cool idea, but I don’t think it really got off the ground. This has much more promise, as it’s mobile. Plus you can attach other things to them, like contact cards and the sort. I’m gonna print my contact card on my business cards, the next time I order some 🙂

  7. @Nitz:
    I was also thinking of the :Cue:Cat when I first saw this (I still have my “neutered” cat, which is modified to function as a normal barcode scanner). Let’s hope MS does a better job pushing this than DigitalConvergence did.

  8. Excellent post as always. I envy your simple communication style and effective use of photoshop. 🙂

    It seems to me Microsoft could easily tweak their software to impose some colorization to allow even grayscale tags to be read natively.

  9. I agree with Roger. I have the verizon xv6800 (i.e. htc titan) and I was not able to get a read with the orange sample. Everything else, including the black and white, worked everytime. Actually the color and the black and white worked really fast compared with the other hues.

    Looks promising though it will depend on how widely will be picked up.

  10. I was thinking about the print media related points people were making — and I realized that if the barcode works from an LCD, it’s gotta work even better in print media (at least theoretically). I mean, LCDs have all sorts of imperfections — cool or warm tones, impreceise rendering of colors, light leakage, differing brightness levels, not to mention refresh rates and glare.

    I bet this stuff will actually work even better in print than it does on LCDs.

  11. Something’s got to give with this.
    I can not realistically imagine a scenario in which they would do a check that it has some color just to make it not work with black and white images (especailly when working in monochrome has clear value).
    Presumably the color encodes data, but there’s just enough error correction to deal with it when the color is monochrome.

  12. Nice finding, but you can already see the drawback in the comments here: one says only orange worked for him, one other says orange did not work for him, the third one says the single-colored variants took very long, and so on. I guess that’s the reason why Microsoft didn’t want to use it single-colored, and it’d be quite a bad idea to use this inofficial single-colored “hack” as you can never be sure who can and who can not read it.
    Anyway, as the other 2D-tags didn’t make their way into real world, I don’t expect Microsoft Tags to change this…

  13. Try taking a picture of two or more of the different colored tags.
    What I found what that no matter how I took the picture my iPhone always chose your red tag over all of the others. It even chose the red tag over the original colors by Microsoft 3/4 times.

    Let me know if anyone else gets similar results.

  14. I’m shocked that I can download the app on my Sony Erricson W580i. If It isn’t a smart phone why did Microsoft support it. Anyways, I tried and it worked great, 99% better on paper than on my LCD.

  15. I’ve got a SE Xperia X1 and the black and white code works for me at the same speed as the colour ones.

  16. All the tags work for me every time; this is on a Sony Ericsson K750i… From the looks of it, the Tag Reader doesn’t make use of the camera’s autofocus system; a shame, but it’s not as if I couldn’t get it to read the tags.

    Slight annoyance with the K750i is the amount of nagging for allowing the app to access the camera, read data, write data etc, but that is a ‘fault’ of SE, not Microsoft.

  17. It is Funny.

    Test this technic if it working black and white.
    If it is, its is a good technic.

    So, why not invent a bw technic or use one of the existing?

  18. Just tried all tags on my iPhone. Of course the normal one works flawlessly, even at slightly off angles (much better than QR codes). The grey was recognized only once, when the camera software didnt mess up the greytones completely. So maybe that was just luck. Of the other variations, only the red with the gradient worked at all; the others were not even recognized a single time. The gradient tag still has a lower recognition rate than the normal tag, though. There are most likely cellphones with better cameras out there; still 1C printing doesnt seem like a good idea to me.

  19. @therpham, that’s an excellent demo. On my Nokia 6210 I could read your hand-drawn tag instantly!

  20. The above statement that “the data is not stored in hue or saturation, but brightness alone” is incorrect. There is no difference in the saturation channel (all four colors are fully saturated); however, differences are obviously contained in the hue channel (black: 0˙, yellow: 60˙, cyan: 180˙, magenta: 300˙).

    Hue alone or brightness alone is enough to distinguish the triangles. Thus the full color tags contain redundant information and are more robust.

  21. I saw your post about Tag yesterday and this follow up is great. One of the criticisms I had in my blog post on thistechnology was the color dependency, so it is nice to see you address it like this! Brilliant!

    I tried out all the variations you listed and only had trouble with the orange-tinted one. It eventually worked, but took some time. The black and white one worked immediately.

    It will be very interesting to see how this product progresses and if it makes inroads.

  22. Very nice tests, compliments and thanks for share this with us!

    In my article I have decided to link this interesting test !! You can found it on ondare.blogspot.com/2009/01/iphone-microsoft-tag-per-tutti-e-il.html

    thanks, bye

  23. Can someone please explain why Microsoft had to waste time and money coming up with this duplication of already existing (and license-free) technologies? Do they think people are stupid enough to throw money at Microsoft for the privilege of getting locked into Microsoft-only technologies, when they can use QR codes instead to accomplish the very same thing, using whatever technologies they wish?

  24. I read somewhere that the last four triangles in the HCCB are the ‘palette’ that the decoder uses to resolve the colors in the remainder of the barcode (once it has figured out orientation, etc using the black and white borders). I tested the theory out – seems to work…


    However, while the monochrome and custom-palettes both seem ‘decode-able’, I’m not sure I’d put on into “print” unless I’d been able to test it across all the supported platforms – quite some effort compared to just accepting CMYK.

  25. Not related to the color issue but rather the tag itself, check the video on the site. They show a poster right after the bus schedule and you can capture the code as it is shown clearly enough! Though amusingly it is for the “Red’ version of Vista, not the example it was highlighting. Video is obviously another pontential application though!

Comments are closed.