Fabric.js - Change Rectangle Fill
Fixed the problem by using basic set method of fabric:
backgroundColor.onchange = function() {
canvas.getActiveObject().set("fill", this.value);
canvas.renderAll();
};
tri this the easy and simple code by fabrics documentation
var activeObject = canvas.getActiveObject();
activeObject.fill = 'your color code value';
canvas.renderAll();