Actually, I was thinking of having it in a new file (say ColorUtils.js) and put the new file in utils folder. And the new file then includes tinycolor library with require("thirdparty/tinycolor/tinycolor-min") so that we can dynamically create a regex with all color names already available in that library.  Once we're sharing tinycolor library across multiple extensions, then we also need to move it from extension folder (src\extensions\default\InlineColorEditor\thirdparty) to src\thirdparty\tinycolor\ folder.

I've some code that dynamically create a regex with color names from tinycolor library in my branch rlim/improved-color-picker. The branch is pretty out-of-sync; so if you want to take a look, then you can just pull out InlineColorEditor.js. Below is my code from that file. Ideally, we should also combine this regex with the original regex that checks for other color formats.

````
    InlineColorEditor.colorNameArray = $.map(tinycolor.names, function (value, key) {
        return "\\b" + key + "\\b";
    });
       
    InlineColorEditor.colorNameRegEx = new RegExp(InlineColorEditor.colorNameArray.join("|"), "g");

````

@oslego Let me know if you want to do all these refactoring and rewriting a new regex.