mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
use bootstrap-colorpicker css from yarn
This commit is contained in:
parent
70bbed190b
commit
5caec5573b
8 changed files with 37 additions and 240 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue