diff --git a/vendor-overwrites/colorpicker/colorview.js b/vendor-overwrites/colorpicker/colorview.js index 92e4e3d4..9d73f55a 100644 --- a/vendor-overwrites/colorpicker/colorview.js +++ b/vendor-overwrites/colorpicker/colorview.js @@ -215,7 +215,10 @@ function parseColorAtCursor(lineText, lineTextLC = lineText.toLowerCase(), ch) { const iHex = lineTextLC.lastIndexOf('#', ch); - const iParen = lineTextLC.lastIndexOf('(', ch); + const iParen = ( + lineTextLC.lastIndexOf('(', ch) + 1 || + lineTextLC.indexOf('(', ch) + 1 + ) - 1; let start = Math.max(iHex, iParen); let match, end, color, colorValue; if (start >= 0) {