mirror of
https://github.com/fruworg/themu.git
synced 2025-01-18 08:50:51 +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…
x
Reference in New Issue
Block a user