Skip to content

Commit

Permalink
update wind colors
Browse files Browse the repository at this point in the history
  • Loading branch information
btomala committed Apr 24, 2024
1 parent f29f440 commit 808e54e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
font-family: Arial, Helvetica, sans-serif;
--small-font-size: calc(0.8em + 0.5vw);
--big-font-size: calc(2em + 0.5vw);
--wind-green: #4ac64a;
--wind-yellow: #e2d02c;
--wind-red: #cb5151;
--wind-blue: #3f97e8;
}
h1 {
text-align: center;
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ function setTemperature(latest) {
value.innerHTML = `${temp} <span>\u{2103}</span>`;
}
function getSpeedColor(speed) {
if (speed < 3) return "lightblue";
else if (speed < 6) return "green";
else if (speed < 10) return "yellow";
else return "red";
if (speed < 3) return "var(--wind-blue)";
else if (speed < 6) return "var(--wind-green)";
else if (speed < 10) return "var(--wind-yellow)";
else return "var(--wind-red)";
}

function getDirectionColor(channel, direction) {
Expand Down

0 comments on commit 808e54e

Please sign in to comment.