samer@47: function L=luminocity(C) samer@47: % luminocity - Compute perceived brightness of colours samer@47: % samer@47: % luminocity :: [[N,3]] -> [[N]]. samer@47: samer@47: if size(C,2)~=3 && size(C,1)==3, C=C'; end samer@47: L=C*[.298936021 .58704307445 .114020904255]';