code: function(args) {
  
                  var amount = Number.isFinite(args.amount) ? args.amount : 1;
  
                  return joint.util.template('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${b} ${h} 0 0 0 0 0 1 0"/></filter>')({
                      a: 0.2126 + 0.7874 * (1 - amount),
                      b: 0.7152 - 0.7152 * (1 - amount),
                      c: 0.0722 - 0.0722 * (1 - amount),
                      d: 0.2126 - 0.2126 * (1 - amount),
                      e: 0.7152 + 0.2848 * (1 - amount),
                      f: 0.0722 - 0.0722 * (1 - amount),
                      g: 0.2126 - 0.2126 * (1 - amount),
                      h: 0.0722 + 0.9278 * (1 - amount)
                  });
              }
docs: `amount` ... the proportion of the conversion (1). A value of 1 (default) is completely grayscale. A value of 0 leaves the input unchanged.