error trying to put a command in minecraft [duplicate]
Unfortunately, the CanPlaceOn tag does not support Damage values as of yet. The syntax of that tag will only accept an array of strings that correspond to block names, therefore you cannot make the item be placed only on a specific colour, only hardened clay in general.
Also, you are currently trying to set a Damage value to the block to be placed rather than the block it should be placed on.