title: average background colors of classes
body: <p>I have a multiple div elements with one to three classes.</p>
  
  <pre><code>&lt;div class="c1 c3"&gt;elem 1&lt;/div&gt;
  &lt;div class="c1"&gt;elem 2&lt;/div&gt;
  &lt;div class="c1 c2 c3"&gt;elem 3&lt;/div&gt;
  &lt;div class="c1 c2"&gt;elem 4&lt;/div&gt;
  </code></pre>
  
  <p>via css I assign background colors</p>
  
  <pre><code>.c1 { background-color: rgb(255, 0, 0); }
  .c2 { background-color: rgb(0, 255, 0); }
  .c3 { background-color: rgb(0, 0, 255); }
  </code></pre>
  
  <p>as css works casscading, the last stated class determines the background color. Is it somehow possible to combine all three classes, e.g. to calculate an intersection color?
  I am thinking of this result: </p>
  
  <pre><code>elem 1 | rgb(128, 0, 128)
  elem 2 | rgb(255, 0, 0)
  elem 3 | rgb(85, 85, 85)
  elem 4 | rgb(128, 128, 0)
  </code></pre>