Hello!
Here some shader I made today!
It utilize some grayscale texture and puts digits from texture atlas in place of original texture.
Everything included in blend file, I hope it is pretty clear to understand it.
digits shader double.blend (1.05 MB)