Skip to content

Commit

Permalink
colors
Browse files Browse the repository at this point in the history
  • Loading branch information
egorkaway committed Jul 23, 2024
1 parent c8e8a56 commit b3cfb5b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions http/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ <h3>Select Level:</h3>
var markersLayer = L.layerGroup().addTo(map);

function getColor(temperature) {
const maxTemp = 50;
const minTemp = -10;
const maxTemp = 40;
const minTemp = -40;
const tempRange = maxTemp - minTemp;
const percentage = (temperature - minTemp) / tempRange;
const hue = (1 - percentage) * 240; // From blue to red
Expand Down
6 changes: 3 additions & 3 deletions http/index_parents.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

function getColor(temperature) {
// Generate color from temperature
const maxTemp = 50;
const minTemp = -10;
const maxTemp = 40;
const minTemp = -40;
const tempRange = maxTemp - minTemp;
const percentage = (temperature - minTemp) / tempRange;
const hue = (1 - percentage) * 240; // From blue to red
const hue = (1 - percentage) * 240;
return `hsl(${hue}, 100%, 50%)`;
}

Expand Down
6 changes: 3 additions & 3 deletions http/reports/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ <h3>Select Level:</h3>
const markersLayer = L.layerGroup().addTo(map);

function getColor(temperature) {
const maxTemp = 50;
const minTemp = -10;
const maxTemp = 37;
const minTemp = -37;
const tempRange = maxTemp - minTemp;
const percentage = (temperature - minTemp) / tempRange;
const hue = (1 - percentage) * 240; // From blue to red
const hue = (1 - percentage) * 360; // From blue to red
return `hsl(${hue}, 100%, 50%)`;
}

Expand Down
4 changes: 2 additions & 2 deletions http/users/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ <h3>Select Level:</h3>
var markersLayer = L.layerGroup().addTo(map);

function getColor(temperature) {
const maxTemp = 50;
const minTemp = -10;
const maxTemp = 40;
const minTemp = -40;
const tempRange = maxTemp - minTemp;
const percentage = (temperature - minTemp) / tempRange;
const hue = (1 - percentage) * 240; // From blue to red
Expand Down

0 comments on commit b3cfb5b

Please sign in to comment.