Implement the shorthand notations that Factorio recognises for colours where individual components may be left out or the colour specified as an array of values instead of an object.