Improve light mode contrast for score colors and map controls

- Darken tier colors for page elements (path, beacon, contact pages):
  EXCELLENT #00ffa3→#059669, GOOD #7dffd4→#0d9488,
  MARGINAL #ffe566→#ca8a04, POOR #ff9044→#ea580c,
  NEGLIGIBLE #ff4f4f→#dc2626
- Make mobile map controls fully opaque (bg-base-100 not /90)
- Map popups (dark background) keep original vibrant colors
This commit is contained in:
Graham McIntire 2026-04-11 14:24:48 -05:00
parent a0c59bd759
commit 8a39ae4411
5 changed files with 26 additions and 26 deletions

View file

@ -19,11 +19,11 @@ defmodule Microwaveprop.Beacons.RangeEstimate do
# Signal-strength tiers and their RX sensitivity thresholds (dBm).
@tiers [
%{label: "Excellent", min_dbm: -100, color: "#00ffa3"},
%{label: "Good", min_dbm: -115, color: "#7dffd4"},
%{label: "Marginal", min_dbm: -125, color: "#ffe566"},
%{label: "Weak CW", min_dbm: -135, color: "#ff9044"},
%{label: "Detection", min_dbm: -145, color: "#ff4f4f"}
%{label: "Excellent", min_dbm: -100, color: "#059669"},
%{label: "Good", min_dbm: -115, color: "#0d9488"},
%{label: "Marginal", min_dbm: -125, color: "#ca8a04"},
%{label: "Weak CW", min_dbm: -135, color: "#ea580c"},
%{label: "Detection", min_dbm: -145, color: "#dc2626"}
]
# Minimum received signal to render a cell.

View file

@ -25,11 +25,11 @@ defmodule Microwaveprop.Propagation.BandConfig do
@sunrise_table [7.4, 7.3, 7.0, 6.7, 6.35, 6.25, 6.35, 6.65, 6.9, 7.1, 7.35, 7.45]
@tiers [
%{min_score: 80, label: "EXCELLENT", color: "#00ffa3"},
%{min_score: 65, label: "GOOD", color: "#7dffd4"},
%{min_score: 50, label: "MARGINAL", color: "#ffe566"},
%{min_score: 33, label: "POOR", color: "#ff9044"},
%{min_score: 0, label: "NEGLIGIBLE", color: "#ff4f4f"}
%{min_score: 80, label: "EXCELLENT", color: "#059669"},
%{min_score: 65, label: "GOOD", color: "#0d9488"},
%{min_score: 50, label: "MARGINAL", color: "#ca8a04"},
%{min_score: 33, label: "POOR", color: "#ea580c"},
%{min_score: 0, label: "NEGLIGIBLE", color: "#dc2626"}
]
@humidity_beneficial_thresholds [{4, 55}, {7, 70}, {10, 82}, {14, 90}, {18, 95}, {22, 88}]

View file

@ -306,7 +306,7 @@ defmodule MicrowavepropWeb.MapLive do
id="map-controls"
class="md:hidden absolute top-2 left-12 z-[1000] flex flex-col gap-2 max-w-[calc(100vw-4rem)]"
>
<div class="bg-base-100/90 shadow rounded-box border border-base-300 p-2 flex flex-col gap-2">
<div class="bg-base-100 shadow rounded-box border border-base-300 p-2 flex flex-col gap-2">
<div class="font-bold text-sm leading-tight px-1 flex items-center justify-between gap-2">
<div class="min-w-0">
<span>NTMS</span>

View file

@ -439,11 +439,11 @@ defmodule MicrowavepropWeb.PathLive do
defp tier_label(score) when score >= 33, do: "POOR"
defp tier_label(_), do: "NEGLIGIBLE"
defp tier_color(score) when score >= 80, do: "#00ffa3"
defp tier_color(score) when score >= 65, do: "#7dffd4"
defp tier_color(score) when score >= 50, do: "#ffe566"
defp tier_color(score) when score >= 33, do: "#ff9044"
defp tier_color(_), do: "#ff4f4f"
defp tier_color(score) when score >= 80, do: "#059669"
defp tier_color(score) when score >= 65, do: "#0d9488"
defp tier_color(score) when score >= 50, do: "#ca8a04"
defp tier_color(score) when score >= 33, do: "#ea580c"
defp tier_color(_), do: "#dc2626"
defp terrain_verdict_class("CLEAR"), do: "badge badge-success"
defp terrain_verdict_class("FRESNEL_MINOR"), do: "badge badge-warning"
@ -959,11 +959,11 @@ defmodule MicrowavepropWeb.PathLive do
"""
end
defp score_bar_color(s) when s >= 80, do: "#00ffa3"
defp score_bar_color(s) when s >= 65, do: "#7dffd4"
defp score_bar_color(s) when s >= 50, do: "#ffe566"
defp score_bar_color(s) when s >= 33, do: "#ff9044"
defp score_bar_color(_), do: "#ff4f4f"
defp score_bar_color(s) when s >= 80, do: "#059669"
defp score_bar_color(s) when s >= 65, do: "#0d9488"
defp score_bar_color(s) when s >= 50, do: "#ca8a04"
defp score_bar_color(s) when s >= 33, do: "#ea580c"
defp score_bar_color(_), do: "#dc2626"
defp factor_name(:humidity), do: "Humidity"
defp factor_name(:time_of_day), do: "Time of Day"

View file

@ -195,11 +195,11 @@ defmodule Microwaveprop.Propagation.BandConfigTest do
tiers = BandConfig.tiers()
[excellent, good, marginal, poor, negligible] = tiers
assert excellent == %{min_score: 80, label: "EXCELLENT", color: "#00ffa3"}
assert good == %{min_score: 65, label: "GOOD", color: "#7dffd4"}
assert marginal == %{min_score: 50, label: "MARGINAL", color: "#ffe566"}
assert poor == %{min_score: 33, label: "POOR", color: "#ff9044"}
assert negligible == %{min_score: 0, label: "NEGLIGIBLE", color: "#ff4f4f"}
assert excellent == %{min_score: 80, label: "EXCELLENT", color: "#059669"}
assert good == %{min_score: 65, label: "GOOD", color: "#0d9488"}
assert marginal == %{min_score: 50, label: "MARGINAL", color: "#ca8a04"}
assert poor == %{min_score: 33, label: "POOR", color: "#ea580c"}
assert negligible == %{min_score: 0, label: "NEGLIGIBLE", color: "#dc2626"}
end
end