Applied the color validation check from Less_Functions::darken to all of the other color modification methods in Less_Functions, making it much easier to debug invalid LESS color statements (Less.php now throws errors on invalid color statements, giving you clues as to what went wrong, instead of just crashing).
Applied the color validation check from Less_Functions::darken to all of the other color modification methods in Less_Functions, making it much easier to debug invalid LESS color statements (Less.php now throws errors on invalid color statements, giving you clues as to what went wrong, instead of just crashing).

Side note:
Personally I would have written it as if (!$color instanceof Less_Tree_color) { } instead of placing each of the methods' entire code inside an if statement, but since darken was already done that way I figured it might be the chosen coding style. Feel free to change if desired.

atdt/less.php,iisisrael/less.php,iisisrael/less.php,oyejorge/less.php,TomArrow/less.php,oyejorge/less.php,TomArrow/less.php,atdt/less.php,atdt/less.php,iisisrael/less.php,TomArrow/less.php,oyejorge/less.php