color change

This commit is contained in:
dan63047 2021-08-12 20:38:28 +03:00
parent 581e57b26a
commit 14c8991b76
2 changed files with 1 additions and 15 deletions

14
.vscode/launch.json vendored
View File

@ -1,14 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "firefox",
"request": "launch",
"name": "Launch Firefox against localhost",
"file": "${workspaceFolder}/index.html"
}
]
}

View File

@ -49,7 +49,7 @@ function changeBackgroundColor() {
let local_t = t.getTime() - t.getTimezoneOffset()*60000 - 180*60000; let local_t = t.getTime() - t.getTimezoneOffset()*60000 - 180*60000;
let color_var = (local_t % 86400000 > 43200000) ? 1-(local_t % 21600000 / 21600000) : local_t % 21600000 / 21600000 let color_var = (local_t % 86400000 > 43200000) ? 1-(local_t % 21600000 / 21600000) : local_t % 21600000 / 21600000
let color_phase = local_t % 86400000 / 21600000 let color_phase = local_t % 86400000 / 21600000
let colors = [[38,41,52], [13,117,248]]; let colors = [[112,38,112], [13,117,248]];
switch (Math.trunc(color_phase)) { switch (Math.trunc(color_phase)) {
case 0: case 0:
case 2: case 2: