Palettes after IHO S-52 (Day / Dusk / Night, the same tokens, data-palette on <html>): night dim with low blue and no white areas, the speed limit sign dimmed too; the dashboard light with dark values by day again (the slider fades it instead of whitening it), the dark bezel for dusk and night
This commit is contained in:
1 parent
4c58c9351f
commit
e62eb90dc7
3 files changed
+135
-24
No files matched your search
+88
-17
@@ -1,18 +1,89 @@
|
||||
/* The UI accent (active items, selected options, primary buttons), from the
|
||||
base map's Park Tiles palette: NPS boundary olive on a light sage. */
|
||||
/* Palettes after IHO S-52's colour tables (docs/design.adoc): the same
|
||||
tokens, three sets of values — Day (light ground, strong contrast against
|
||||
bright sun), Dusk (dark ground, also by day), Night (dark, dim, little
|
||||
blue: nothing brighter than the map). <html data-palette="dusk|night">
|
||||
switches; Day is the default. Meanings never change between them. */
|
||||
:root {
|
||||
/* planning UI (NPS) */
|
||||
--ui-bg: #ffffff;
|
||||
--ui-fg: #1a1a1a;
|
||||
--ui-muted: #6b6b66;
|
||||
--ui-line: #d9d6cc;
|
||||
--accent: #546619;
|
||||
--accent-bg: #e1e5cf;
|
||||
/* The Unigrid black band (topbar) — also the instruments' bezel. */
|
||||
--band: #1a1a1a;
|
||||
/* Instruments (the driving view), one meaning per color — docs/design.adoc. */
|
||||
--inst-text: #f2f2f2;
|
||||
--inst-muted: #9aa0a6;
|
||||
--inst-ok: #3ccf4e;
|
||||
--inst-caution: #ffb300;
|
||||
--inst-warning: #ff3b30;
|
||||
--inst-active: #e040fb; /* magenta: the route / waypoint / lane being followed */
|
||||
--inst-selected: #00d5ff; /* cyan: a value set by hand */
|
||||
--band-fg: #ffffff;
|
||||
/* Instruments (the driving view), one meaning per color. Day: a light
|
||||
card with dark values, as S-52's Day table (bright sun); the slider
|
||||
fades the card, the values stay. */
|
||||
--inst-bezel: 255 255 255; /* rgb, the card's opacity applied */
|
||||
--inst-halo: #ffffff; /* the outline that keeps values readable over the map */
|
||||
--inst-text: #1a1a1a;
|
||||
--inst-muted: #5f6368;
|
||||
--inst-ok: #1e8e3e;
|
||||
--inst-caution: #b36b00;
|
||||
--inst-warning: #d93025;
|
||||
--inst-active: #a21caf; /* magenta: the route / waypoint / lane being followed */
|
||||
--inst-selected: #00799a; /* cyan: a value set by hand */
|
||||
--route-planned: #1d6fdc;
|
||||
--route-active: var(--inst-active);
|
||||
/* road signs: still the sign (white disc, red ring), dimmed by night */
|
||||
--sign-bg: #ffffff;
|
||||
--sign-ring: #d32f2f;
|
||||
--sign-fg: #111111;
|
||||
}
|
||||
|
||||
:root[data-palette="dusk"] {
|
||||
--ui-bg: #1f201d;
|
||||
--ui-fg: #dedbd0;
|
||||
--ui-muted: #9b988d;
|
||||
--ui-line: #3a3a35;
|
||||
--accent: #a5b84f;
|
||||
--accent-bg: #353b20;
|
||||
--band: #0f0f0e;
|
||||
--band-fg: #dedbd0;
|
||||
--inst-bezel: 15 15 14;
|
||||
--inst-halo: #000000;
|
||||
--inst-text: #e2dfd5;
|
||||
--inst-muted: #8c8a82;
|
||||
--inst-ok: #34b545;
|
||||
--inst-caution: #e8a200;
|
||||
--inst-warning: #ec3a2f;
|
||||
--inst-active: #cc45e0;
|
||||
--inst-selected: #12bedf;
|
||||
--route-planned: #3f86e0;
|
||||
--sign-bg: #e4e1d6;
|
||||
--sign-ring: #c42b26;
|
||||
}
|
||||
|
||||
/* Night: about a third of Day's luminance, warm greys, blue kept low; the
|
||||
UI never brighter than the map (S-52: added panels "should never
|
||||
generate more light than the chart display itself"). */
|
||||
:root[data-palette="night"] {
|
||||
--ui-bg: #0c0c0b;
|
||||
--ui-fg: #8f8b80;
|
||||
--ui-muted: #5f5c55;
|
||||
--ui-line: #24231f;
|
||||
--accent: #6e7c32;
|
||||
--accent-bg: #1d2113;
|
||||
--band: #000000;
|
||||
--band-fg: #8f8b80;
|
||||
--inst-bezel: 0 0 0;
|
||||
--inst-halo: #000000;
|
||||
--inst-text: #a29d90;
|
||||
--inst-muted: #5f5c55;
|
||||
--inst-ok: #2a8a33;
|
||||
--inst-caution: #a87400;
|
||||
--inst-warning: #ad2a20;
|
||||
--inst-active: #94339f;
|
||||
--inst-selected: #137a8c;
|
||||
--route-planned: #2a5a99;
|
||||
--sign-bg: #6b675e;
|
||||
--sign-ring: #8a231b;
|
||||
--sign-fg: #0c0c0b;
|
||||
}
|
||||
|
||||
html, body {
|
||||
@@ -3320,14 +3391,14 @@ html.night .maplibregl-marker {
|
||||
z-index: 3;
|
||||
padding: 8px;
|
||||
border-radius: 12px;
|
||||
background: rgb(26 26 26 / var(--dash-alpha, 0.45));
|
||||
background: rgb(var(--inst-bezel) / var(--dash-alpha, 0.45));
|
||||
backdrop-filter: blur(2px);
|
||||
box-shadow: 0 1px 6px rgb(0 0 0 / calc(var(--dash-alpha, 0.45) * 0.6));
|
||||
color: var(--inst-text);
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
/* readable over a light map whatever the bezel's opacity */
|
||||
text-shadow: 0 0 3px #000, 0 0 3px #000;
|
||||
text-shadow: 0 0 3px var(--inst-halo), 0 0 3px var(--inst-halo);
|
||||
font-family: system-ui, sans-serif;
|
||||
}
|
||||
|
||||
@@ -3337,8 +3408,8 @@ html.night .maplibregl-marker {
|
||||
height: 190px;
|
||||
}
|
||||
|
||||
.dash-incl text { text-anchor: middle; dominant-baseline: middle; fill: var(--inst-text); paint-order: stroke; stroke: #000; stroke-width: 3px; }
|
||||
.dash-face { fill: rgb(0 0 0 / calc(var(--dash-alpha, 0.45) * 0.5)); stroke: var(--inst-muted); stroke-width: 2; }
|
||||
.dash-incl text { text-anchor: middle; dominant-baseline: middle; fill: var(--inst-text); paint-order: stroke; stroke: var(--inst-halo); stroke-width: 3px; }
|
||||
.dash-face { fill: rgb(var(--inst-bezel) / calc(var(--dash-alpha, 0.45) * 0.6)); stroke: var(--inst-muted); stroke-width: 2; }
|
||||
.dash-ring line { stroke: var(--inst-muted); stroke-width: 2; }
|
||||
.dash-ring text { font-size: 14px; font-weight: 600; }
|
||||
.dash-ring .dash-n { fill: var(--inst-warning); }
|
||||
@@ -3360,13 +3431,13 @@ html.night .maplibregl-marker {
|
||||
/* a road sign stays a road sign: white disc, red ring, black figures */
|
||||
.dash-limit {
|
||||
display: inline-flex; align-items: center; justify-content: center; flex: none;
|
||||
width: 56px; height: 56px; box-sizing: border-box; border: 7px solid #d32f2f; border-radius: 50%;
|
||||
background: #fff; color: #111; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: none;
|
||||
width: 56px; height: 56px; box-sizing: border-box; border: 7px solid var(--sign-ring); border-radius: 50%;
|
||||
background: var(--sign-bg); color: var(--sign-fg); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: none;
|
||||
}
|
||||
.dash-limit[hidden] { display: none; }
|
||||
.dash-limit--small { width: 26px; height: 26px; border-width: 3px; font-size: 11px; vertical-align: middle; }
|
||||
/* no limit (Autobahn): the white sign with the black slash */
|
||||
.dash-limit--none { border: 2px solid #111; background: linear-gradient(135deg, transparent 45%, #111 45% 55%, transparent 55%), #fff; }
|
||||
.dash-limit--none { border: 2px solid var(--sign-fg); background: linear-gradient(135deg, transparent 45%, var(--sign-fg) 45% 55%, transparent 55%), var(--sign-bg); }
|
||||
.dash-ahead > div { margin: 2px 0; white-space: nowrap; }
|
||||
.dash-maneuver { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--inst-active); }
|
||||
.dash-signal {
|
||||
@@ -3377,11 +3448,11 @@ html.night .maplibregl-marker {
|
||||
.dash-lanes { display: flex; gap: 3px; }
|
||||
.dash-card--over { box-shadow: 0 0 0 4px var(--inst-warning), 0 1px 6px rgba(0, 0, 0, 0.25); }
|
||||
.dash-card--over .dash-speed span { color: var(--inst-warning); }
|
||||
.dash-lanes svg.dash-lane { width: 26px; height: 34px; border-radius: 4px; background: rgb(0 0 0 / 0.45); border: 1px solid var(--inst-muted); box-sizing: border-box; }
|
||||
.dash-lanes svg.dash-lane { width: 26px; height: 34px; border-radius: 4px; background: rgb(var(--inst-bezel) / 0.7); border: 1px solid var(--inst-muted); box-sizing: border-box; }
|
||||
.dash-lane__arrow { fill: none; stroke: var(--inst-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.dash-lane--go { border-color: var(--inst-active) !important; }
|
||||
.dash-lane--go .dash-lane__arrow { stroke: var(--inst-text); }
|
||||
.dash-lane--go .dash-lane__take { stroke: var(--inst-active); stroke-width: 3; }
|
||||
.dash-lane--go .dash-lane__take { stroke: var(--inst-active); stroke-width: 3.5; }
|
||||
.dash-offroute { color: var(--inst-caution); font-weight: 600; }
|
||||
/* The GNSS position once it has a course: an arrow, not the dot. */
|
||||
.gnss-marker--arrow { width: 26px; height: 26px; border: none; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5)); }
|
||||
|
||||
Reference in new issue
Block a user