use bootstrap-colorpicker css from yarn

This commit is contained in:
Thomas Grainger 2016-11-30 10:57:53 +00:00
parent 70bbed190b
commit 5caec5573b
No known key found for this signature in database
GPG key ID: 995EA0A029283160
8 changed files with 37 additions and 240 deletions

View file

@ -226,26 +226,14 @@ const HTML = {
cmyk = `cmyk(${c}, ${m}, ${y}, ${k})`;
// Generate output
return `${"<div id='colorpicker' style='display: inline-block'></div>" +
return `${"<div data-cyber-chef-func='colorpicker' data-rgba='" + rgba + "' id='colorpicker' style='display: inline-block'></div>" +
'Hex: '}${hex}\n` +
`RGB: ${rgb}\n` +
`RGBA: ${rgba}\n` +
`HSL: ${hsl}\n` +
`HSLA: ${hsla}\n` +
`CMYK: ${cmyk
}<script>\
$('#colorpicker').colorpicker({\
format: 'rgba',\
color: '${rgba}',\
container: true,\
inline: true,\
}).on('changeColor', function(e) {\
var color = e.color.toRGB();\
document.getElementById('input-text').value = 'rgba(' +\
color.r + ', ' + color.g + ', ' + color.b + ', ' + color.a + ')';\
window.app.auto_bake();\
});\
</script>`;
}`;
},
@ -858,3 +846,5 @@ const HTML = {
},
};
export default HTML;