Smooth gradient with Less CSS

In case of a part-height gradient the CSS' default linear-gradient looks pretty awful at the edge, so we gotta use multiple color points and custom non-linear formula. With pure CSS on every little change we must regenerate source code by a tool. Fortunately less css allows some parametrization, and here is a good looking pre-calculated formula below.
html {
  min-height: 100%;
  @height: 500px; // height of the gradient
  @start: red;    // start color
  @end: green;    // end color
  background: linear-gradient(to bottom,
        mix(@start, @end, 100%)  @height*0.0,
        mix(@start, @end, 73.8%) @height*0.19,
        mix(@start, @end, 54.1%) @height*0.34,
        mix(@start, @end, 38.2%) @height*0.47,
        mix(@start, @end, 27.8%) @height*0.565,
        mix(@start, @end, 19.4%) @height*0.65,
        mix(@start, @end, 12.6%) @height*0.73,
        mix(@start, @end, 7.5%)  @height*0.802,
        mix(@start, @end, 4.2%)  @height*0.861,
        mix(@start, @end, 2.1%)  @height*0.91,
        mix(@start, @end, 0.8%)  @height*0.952,
        mix(@start, @end, 0.2%)  @height*0.982,
        mix(@start, @end, 0%)    @height*1
  ) no-repeat;