Enter the number 1 to generate a colored map icon /blockdata command for minecraft. 2 works as well, but that's not terribly important for you to know why. Look in the code if you care. To get your colored map icon, enter the resulting command into a command block, then put a chest on top. Activate command block.
I believe I was the first to do this. I created this project much earlier this year.