html mendapatkan properti kelas

let element = document.querySelector('.preset');
let style = getComputedStyle(element);
let bg = style.backgroundColor;
garzj