skip nav

blog

A Visual Emoji Tester

A few months ago I got massively sniped by https://spiffy.tech/is-this-an-emoji. I wrote up a different, more reliable approach (although more computationally intensive) to answer the question, "is this string one single colour emoji".

Presenting: The Visual Emoji Tester.

A screenshot with the word input, then an input with the colour emoji slightly smiling face, an arrow to the same emoji but rendered smaller and fuzzier, and then the verdict, Is One Colour Emoji: True.

The approach the Visual Emoji Tester takes is to draw the text in question to a canvas, then see if there are any visible spaces in the resulting image. If there are, then we've got multiple characters. Similarly, if there's no colour in the resulting image, then it's not a colour emoji. The process is fairly future-proof, too - it will never go out of date as new emoji are released and incorporated into your font!

tags: web dev, emoji, toy, tool