Experiment with focusing on negative space
@@ -28,6 +28,7 @@ pub enum ColorSchemeChoice {
MapboxLight,
MapboxDark,
FadedZoom,
+ NegativeSpace,
}
impl ColorSchemeChoice {
@@ -44,6 +45,7 @@ impl ColorSchemeChoice {
Choice::new("mapbox light", ColorSchemeChoice::MapboxLight),
Choice::new("mapbox dark", ColorSchemeChoice::MapboxDark),
Choice::new("faded zoom", ColorSchemeChoice::FadedZoom),
+ Choice::new("negative space", ColorSchemeChoice::NegativeSpace),
]
}
}
@@ -153,6 +155,7 @@ impl ColorScheme {
ColorSchemeChoice::MapboxLight => ColorScheme::mapbox_light(),
ColorSchemeChoice::MapboxDark => ColorScheme::mapbox_dark(),
ColorSchemeChoice::FadedZoom => ColorScheme::faded_zoom(),
+ ColorSchemeChoice::NegativeSpace => ColorScheme::negative_space(),
};
cs.scheme = scheme;
cs
@@ -277,6 +280,10 @@ impl ColorScheme {
}
pub fn unzoomed_road_surface(&self, rank: RoadRank) -> Color {
+ if self.scheme == ColorSchemeChoice::NegativeSpace {
+ return Color::BLACK;
+ }
+
match rank {
RoadRank::Highway => self.unzoomed_highway,
RoadRank::Arterial => self.unzoomed_arterial,
@@ -291,6 +298,7 @@ impl ColorScheme {
RoadRank::Arterial => hex("#B6BDC5"),
RoadRank::Local => hex("#C6CDD5"),
},
+ ColorSchemeChoice::NegativeSpace => Color::BLACK,
_ => match lane {
LaneType::Driving => self.driving_lane,
LaneType::Bus => self.bus_lane,
@@ -463,4 +471,25 @@ impl ColorScheme {
let cs = ColorScheme::standard();
cs
}
+
+ fn negative_space() -> ColorScheme {
+ let mut cs = ColorScheme::standard();
+ let nonempty_space = Color::BLACK;
+ cs.map_background = Color::WHITE.into();
+ cs.residential_building = nonempty_space;
+ cs.commerical_building = nonempty_space;
+ cs.building_outline = nonempty_space;
+ cs.normal_intersection = nonempty_space;
+ cs.general_road_marking = nonempty_space;
+ cs.road_center_line = nonempty_space;
+ cs.stop_sign = nonempty_space;
+ cs.stop_sign_pole = nonempty_space;
+ cs.sidewalk_lines = nonempty_space;
+ cs.parking_lot = nonempty_space;
+ cs.grass = nonempty_space.into();
+ cs.water = nonempty_space.into();
+ // TODO Why is this showing up?!
+ cs.light_rail_track = Color::INVISIBLE;
+ cs
+ }
}
