var fs = require('fs');

export default function colorCounter(filePath) {
  var cssParser = require('css');
  let colors = new Map();
  let ast = cssParser.parse(fs.readFileSync(filePath, 'utf8'), { source: filePath });

  ast.stylesheet.rules.forEach(function(rule) {
    if(rule['declarations'] == undefined) return;

    rule['declarations'].forEach(function(declaration) {
      if(!(declaration['property'] == 'color')) return;

      colors.set(declaration['value'], (colors.get(declaration['value']) || 0) + 1)
    });

  });

  return colors;
}

@@ -423,24 +423,166 @@
 )) return;%0A%0A
+      if(declaration%5B'value'%5D.includes('important')) %7B%0A        declaration%5B'value'%5D = declaration%5B'value'%5D.replace('!important', '')%0A      %7D%0A%0A
       colors

Remove !important from colors