Parser and generator for CSS color strings