Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const hues = [
'red',
'pink',
'blue',
'orange',
'purple',
'monochrome'
];
let colorData = {
luminosity: 'light',
hue: hues[getRandomInt(0, 5)]
};
const observer = new ResizeObserver(entries => {
for (const entry of entries) {
const rect = entry.contentRect;
const dimensionsStr = `${rect.width.toFixed(2)} x ${rect.height.toFixed(2)}`;
entry.target.firstElementChild.textContent = dimensionsStr;
}
});
let index = 0;
let queue = [];
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function updateColorData() {