fix rgb/rgba color parsing, added appropriate test cases for it