Ah right, well, you could still use the Moodle colour picker. This is a line from the colour picker class I mentioned above:
$PAGE->requires->js_init_call('M.util.init_colour_picker', array($this->get_id(), $this->previewconfig));
So you could call that from your plugin lib.php just replace $this->get_id() with the id of your text box, and previewconfig, not sure, I don't think you need that.
This is the description above the init_colour_picker js in lib/javascript-static.js
* Designed to be used with admin_setting_configcolourpicker although could be used
* anywhere, just give a text input an id and insert a div with the class admin_colourpicker
* above or below the input (must have the same parent) and then call this with the
* id.
*
* This code was mostly taken from my [Sam Hemelryk] css theme tool available in
* contrib/blocks. For better docs refer to that.