css: Improve rgb()/rgba() color parsing

- Don't crash when there's no '('
- Allow mixed numbers and percentages
- Accept real numbers and not just ints
- Allow '.' as the only separator
- Use less code