cloudhead/less.js — pull request #1148 by Synchro (2013-01-23 08:44:54+00:00)
Title: Better implementation of luma

This is really how I originally intended to implement luma but couldn't quite figure it out at the time!
This makes luma a function of the color object rather than a less function. It retains that interface, but it now means that the luma calculation only happens in one place (previously it was in two). The color object's luma function does not look at alpha, but the luma and contrast less functions do take alpha into account.
Also integrates a tweak to the contrast function that means that light and dark parameters are set according to their luma value, not their order, so the result of these will be the same:

@a: contrast(#fff, #eeeeee, #111111);
@b: contrast(#fff, #111111, #eeeeee);

I don't think this has any BC issues. All test cases still pass, and I've added a case for the contrast tweak.