Setting freedrawcolor with Spectrum Color Picker
问题 I've got a fabricjs canvas initiated with a color picker toggled via a button. I'd like to set the freedrawcolor with this but haven't had any luck. Here's what I'm working with now: https://jsfiddle.net/code4ever/7djLqobh/ var canvas = window._canvas = new fabric.Canvas('canvas', { isDrawingMode: true, }); $("#toggle").spectrum({ showPaletteOnly: true, showPalette: true, color: 'black', hideAfterPaletteSelect: true, palette: [ ['black'], ['blue'], ['red'] ], change: function(selectedColor) {