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?
I think the question was correctly identified as a duplicate, but for the sake of answering it correctly, here is the right answer (based on seven-phases-max's answer):
contrast(@color-input, lighten(@color-input, 10%), darken(@color-input, 10%));
You can see a working example here.
You can read more about the contrast function here.