Improve color serialization to reflect rgb/rgba rules.
Fix color serialization.