title: How to make a colour darker if light, or lighter if dark in LESS
body: <p>Given a colour as input, how do you transform it in LESS so that it becomes darker if it's a light colour, or lighter if it's a dark colour?</p>
  
  <p>For example:</p>
  
  <ul>
  <li>when the colour is <strong>dark</strong>, the result is something like <code>darken(@color-input, 10%)</code></li>
  <li>when the colour is <strong>light</strong>, the result is something like <code>lighten(@color-input, 10%)</code></li>
  </ul>
  
  <p>Is there any conditional test that can be applied or any <a href="http://lesscss.org/functions/#color-operations" rel="nofollow noreferrer">color operation</a> that would give this result?</p>