From f24ebc9ac0db8475239b63d7ddf1c857caf3d281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Stra=C3=9Fburger?= Date: Mon, 3 Oct 2016 05:30:59 +0200 Subject: [PATCH] :art: starting work on basic dark theme --- styles/bright.json | 6 +-- styles/dark.json | 126 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 styles/dark.json diff --git a/styles/bright.json b/styles/bright.json index 312d94f..5dabf44 100644 --- a/styles/bright.json +++ b/styles/bright.json @@ -1809,7 +1809,7 @@ "type": "symbol", "id": "place_label_other", "paint": { - "text-color": "#633" + "text-color": "#733" }, "source-layer": "place_label", "filter": [ @@ -1841,7 +1841,7 @@ "type": "symbol", "id": "place_label_village", "paint": { - "text-color": "#333" + "text-color": "#a33" }, "source-layer": "place_label", "filter": [ @@ -1869,7 +1869,7 @@ "type": "symbol", "id": "place_label_town", "paint": { - "text-color": "#333" + "text-color": "#933" }, "source-layer": "place_label", "filter": [ diff --git a/styles/dark.json b/styles/dark.json new file mode 100644 index 0000000..7d2f896 --- /dev/null +++ b/styles/dark.json @@ -0,0 +1,126 @@ +{ + "name": "black background", + "constants": { + "@name": "{name}", + "@land": "#111", + "@water": "#00f", + "@park": "#0f0", + "@building": "#ccc", + "@label": "#888", + + + "@road-secondary-filter": ["in", "type", "secondary"], + "@road-secondary": "#0f0", + "@road-secondary-width": 1, + + "@road-tertiary-filter": ["in", "type", "tertiary"], + "@road-tertiary": "#ff0", + "@road-local-width": 1, + + "@road-local-filter": ["in", "type", "pedestrian", "footway", "living_street", "residential"], + "@road-local": "#f00", + "@road-local-width": 1, + + + "@road-major": "#fcc", + "@road-minor": "#fff", + "@road-major-width": { + "base": 1.4, + "stops": [[6, 0.5], [20, 30]] + }, + "@road-minor-width": { + "base": 1.55, + "stops": [[4, 0.25], [20, 30]] + }, + "@major_rail_hatching_width": { + "stops": [[12, 5], [20, 10]] + }, + "@major_rail_hatching_dasharray": [0.05, 10], + "@railroad": "#333", + "@path": "#555", + "@path_width": { + "base": 1, + "stops": [[15, 1.25], [20, 2]] + }, + "@path_steps_width": { + "base": 1.3, + "stops": [[15, 1.5], [20, 10]] + }, + "@path_dasharray_primary": [3, 1] + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "@land" + } + }, { + "id": "road_local", + "type": "line", + "source-layer": "road", + "filter": ["all", ["==", "$type", "LineString"], "@road-local-filter"], + "paint": { + "line-color": "@road-local", + "line-width": "@road-local-width" + } + }, { + "id": "road_secondary", + "type": "line", + "source-layer": "road", + "filter": ["all", ["==", "$type", "LineString"], "@road-secondary-filter"], + "paint": { + "line-color": "@road-secondary", + "line-width": "@road-secondary-width" + } + }, { + "id": "road_tertiary", + "type": "line", + "source-layer": "road", + "filter": ["all", ["==", "$type", "LineString"], "@road-tertiary-filter"], + "paint": { + "line-color": "@road-tertiary", + "line-width": "@road-tertiary-width" + } + }, { + "id": "water", + "type": "fill", + "source-layer": "water", + "paint": { + "fill-color": "@water" + } + }, { + "id": "building", + "type": "fill", + "source-layer": "building", + "paint": { + "fill-color": "@building" + } + }, { + "id": "tunnel_minor", + "type": "line", + "source-layer": "road", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["==", "structure", "tunnel"], + ["in", "type", "motorway_link", "street", "street_limited", "service", "driveway", "path"] + ], + "paint": { + "line-color": "@road-minor", + "line-width": "@road-minor-width", + "line-dasharray": [0.36, 0.18] + } + }, { + "id": "tunnel_major", + "type": "line", + "source-layer": "tunnel", + "filter": ["all", ["==", "$type", "LineString"], ["type", "class", "motorway", "main"]], + "paint": { + "line-color": "@road-major", + "line-width": "@road-major-width", + "line-dasharray": [0.28, 0.14] + } + } + ] +}