Update color.js

This commit is contained in:
Руслан 2023-08-19 16:25:00 +06:00 committed by GitHub
parent ee62aa19aa
commit 0791348e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,9 +144,8 @@ function getRandomColorName() {
}
function setRandomColor() {
const colorBox = document.querySelector('.color-box');
const randomColorName = getRandomColorName();
colorBox.style.setProperty('--maincolor', randomColorName);
document.documentElement.style.setProperty('--main-color', randomColorName);
}
// Set random color on page load