public boolean function isValidHex( required string colour )
Checks that a given colour value is a valid 3- or 6-character hex colour.