title: Gulp/Grunt grab all color variables in a Stylus sheet, and write them to a file as variable definitions
body: <p>From a set of <code>.styl</code> files in a directory, find all CSS properties that use variables as colors, and generate a <code>colors.styl</code> file (bonus: or insert the resulting string within a placeholder in an existing file) that defines those variables. </p>
  
  <h2>Example:</h2>
  
  <pre><code>.
  └── styl
      ├── library
      │   └── palettes-package.styl
      └── my-styles.styl
  
  2 directories, 2 files
  </code></pre>
  
  <h3>styl/my-styles.styl</h3>
  
  <pre><code>@import "library/palettes-package"
  
  body 
      background-color: palettes-red-1
  
  p
      color: palettes-grey-1
  
  span
      border: 1px solid #000000
  </code></pre>
  
  <h3>styl/libraries/palettes-package.styl</h3>
  
  <pre><code>palettes-red-1 = #FF0000
  palettes-grey-1 = #EEEEEE
  </code></pre>
  
  <h3>Result</h3>
  
  <pre><code>palettes-red-1 = #FF0000
  palettes-grey-1 = #EEEEEE
  </code></pre>
  
  <p>As a string to be appended into a file.</p>
  
  <p>Bonus also if it includes</p>
  
  <pre><code>calculated-1 = #000000
  </code></pre>
  
  <p>and <code>#000000</code> is replaced for <code>calculated-1</code> in my-styles.styl.</p>