Easiest way (I'm sure it's been done) would be to encode as QR codes and print that. (Multi-filament for two colours, or raise one of them enough for shadow or filament change.)