Using variables from PHP code in your LESS files

assetic:
    filters:
        lessphp:
            apply_to: "\.less$"
            # Formatter options: compressed, lessjs, classic
            formatter: "compressed"
            preserve_comments: false
            presets:
                my_variable: "#000"

http://isometriks.com/using-less-with-symfony2