for those struggling with this, use the CDN of jscolor;no need to host it yourself, the below code works
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jscolor/2.5.2/jscolor.min.js"></script>
<script>
function addHtml() {
document.querySelector('#out').innerHTML += '<input data-jscolor="{}">'
jscolor.install() // recognizes new inputs and installs jscolor on them
}
</script>
<button onclick="addHtml()">Click to generate HTML input</button>
<p id="out"></p>