From a4293068bf131b81d1263e02348549e1a7dabb18 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 8 Jan 2025 14:49:19 +0000 Subject: [PATCH] Clarify method name --- core/modules/editor/engines/simple.js | 2 +- core/modules/utils/dom/color-utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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"});