Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool for cleaning up CSS colours

Tags:

css

Can anyone recommend a tool to help clean up the colours used in a CSS file?

We have a CSS file with 196 different colours defined in it. Most of the colours are only slight variation of each other. We would like to be able to select multiple similar colours and re-map them to a single colour.

TopStyle allows you to see the colour palette of your CSS and replace them individually, but won't allow you to select multiple colours to replace in one go.

Are there any useful tools out there that might help us?

like image 505
William Owen Avatar asked Aug 25 '11 14:08

William Owen


1 Answers

I would do a PHP parser to find the values of the colors (some regular expression to match #;) and then a replace... I dont know of any tool that would do this.

like image 72
MarkG Avatar answered Oct 24 '22 18:10

MarkG