diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index 1f46505f7..3c7f7d0c9 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -33,7 +33,7 @@ function SimpleEngine(options) { } else { if(this.widget.editType === "color") { // The element requires a six digit hex value - this.domNode.value = $tw.utils.convertColorToCSSRGBString(this.value); + this.domNode.value = $tw.utils.convertCSSColorToRGBString(this.value); } else { this.domNode.value = this.value; } diff --git a/core/modules/utils/dom/color-utils.js b/core/modules/utils/dom/color-utils.js index 5e4c481fb..01379c27d 100644 --- a/core/modules/utils/dom/color-utils.js +++ b/core/modules/utils/dom/color-utils.js @@ -42,9 +42,9 @@ exports.parseCSSColorObject = function(colourString) { }; /* -Convert a Color.js colour to a CSS RGB string suitable for use with the element +Convert a CSS colour to an RGB string suitable for use with the element */ -exports.convertColorToCSSRGBString = function(colourString) { +exports.convertCSSColorToRGBString = function(colourString) { var c = exports.parseCSSColorObject(colourString); if(c) { var hex = c.toString({format: "hex"});