mirror of
https://github.com/fruworg/themu.git
synced 2024-11-16 07:07:16 +03:00
Update color.js
This commit is contained in:
parent
ee62aa19aa
commit
0791348e3b
@ -144,9 +144,8 @@ function getRandomColorName() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setRandomColor() {
|
function setRandomColor() {
|
||||||
const colorBox = document.querySelector('.color-box');
|
|
||||||
const randomColorName = getRandomColorName();
|
const randomColorName = getRandomColorName();
|
||||||
colorBox.style.setProperty('--maincolor', randomColorName);
|
document.documentElement.style.setProperty('--main-color', randomColorName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set random color on page load
|
// Set random color on page load
|
||||||
|
Loading…
Reference in New Issue
Block a user