Are your color signatures working? I have never used the objectCount attribute, so can’t say if that is reliable or not. Other than that, your functions look good.
It may be that you haven’t defined “PURPLE_CUBE” and need to either hard code it or set it up in the vision sensor software (may be built into vexcode, I don’t use it)
If you mean your source code, then you include it in your post surrounded by the [code] ... [/code] tags. Or if you mean vision sensor signatures, then there is a utility for that: Vision sensor setup
Yes, that’s what @weilin meant too - copy your program and paste it into a reply, including [code] before it and [ /code] (without the errant space) after it.