There is a difference between colour and colour:roof, for the exact reason that you indicate: a house have multiple parts with different colours. The colour key could be used e.g. on a mailbox or a fire hydrant, for the roof you have to use “colour:roof”
There is a JOSM preset that should help you with the 3D mapping of a house (which includes colour:roof) “3D Simple Buildings”.
The same author made a plugin that allows you to preview the 3D modelling from within JOSM. look for kendzi.
There is no list of valid keys against which JOSM could validate it, as anyone can create a new key. Consequently JOSM will accept it.
In that case, it should be sufficiently obvious to a human that is gibberish, and a later editor, at least if they are using an editor that doesn’t hide unknown keys, should clean it up.
More difficult can be small errors in keys and unnecessary invention of knew keys. The view tends to be that one should contact the author in the first case and cope with the latter in programs that use the data.
If you want to contribute to maps using a closed vocabulary, consider using Google, however I think you will find that there are too many things that you can’t encode.
Google allow user contributions to their maps. Such contributions cannot, of course, then be used in OSM, unless submitted directly by the original contributor.
When I tried doing this, I found that they would only accept keys that were known to their editor. As a result, one of the problems was that that one could not map things that they had not allowed for.
The other problem I found was that all contributions were moderated before being made available, and I found that their moderators were too self important, and too legalistic in applying rules to reject contributions.
To compound the lack range of keys, I found that the documentation on those keys, and their rules was nothing like as clear as that in the OSM wiki.
With “the value syntax” the author means everything on the right hand side of the equation sign in other words the value of the tag.
So you can write the name of a colour there (e.g. red) or use a hex code (like #ff0000).