Skip to content

Commit

Permalink
improvement:layout: Small color tweaks and added polylines (#1024)
Browse files Browse the repository at this point in the history
* Small color tweaks and added polylines

* Add color conversion support script

* Bring car_dark up-to-date

* dark: forgot meadow

* Improve color support script

* Add comments
  • Loading branch information
jfitie committed Jun 17, 2020
1 parent 22290e0 commit fbe143e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 13 deletions.
7 changes: 7 additions & 0 deletions navit/navit_layout_car_convertrgbfordark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
if [[ $1 =~ ^[0-9a-fA-F]{6}$ ]]; then
echo Light: $1
echo Dark:\ $(printf '%02x' $(echo $(printf "%d" 0x${1:0:2})/34 | bc))$(printf '%02x' $(echo $(printf "%d" 0x${1:2:2})/8 | bc))$(printf '%02x' $(echo $(printf "%d" 0x${1:4:2})/9 | bc))
else
echo Usage: $0 RRGGBB
fi
29 changes: 22 additions & 7 deletions navit/navit_layout_car_dark_shipped.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
</itemgra>
</cursor>
<layer name="polygons">
<!-- Colors based on Car layout; R/34 G/8 B/9 -->
<!-- Colors based on car_shipped layout; R/34 G/8 B/9 -->
<!-- Use navit_layout_car_convertrgbfordark.sh script for color conversion -->
<itemgra item_types="image" order="0-">
<image/>
</itemgra>
Expand All @@ -84,6 +85,7 @@
</itemgra>
<itemgra item_types="poly_industry,poly_place" order="0-">
<polygon color="#061b18"/>
<polyline color="#051714"/>
</itemgra>
<itemgra item_types="poly_naval_base" order="10-">
<polygon color="#03140f"/>
Expand Down Expand Up @@ -157,15 +159,17 @@
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_camp_site" order="10-">
<polygon color="#041909"/>
<polygon color="#031b0d"/>
<polyline color="#021709"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_caravan_site" order="10-">
<polygon color="#041b0b"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_golf_course" order="10-">
<polygon color="#03190b"/>
<polygon color="#031b0f"/>
<polyline color="#02170b"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_marsh" order="10-">
Expand All @@ -185,11 +189,13 @@
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_park" order="0-">
<polygon color="#031909"/>
<polygon color="#041b0d"/>
<polyline color="#031709"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_heath" order="10-">
<polygon color="#061c11"/>
<polyline color="#05170d"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_scree" order="10-">
Expand Down Expand Up @@ -226,6 +232,7 @@
</itemgra>
<itemgra item_types="poly_sport" order="10-">
<polygon color="#051c0d"/>
<polyline color="#041709"/>
</itemgra>
<itemgra item_types="poly_fishing" order="10-">
<polygon color="#030700"/>
Expand All @@ -244,7 +251,8 @@
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_picnic_site" order="10-">
<polygon color="#030f07"/>
<polygon color="#061b11"/>
<polyline color="#05170d"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_greenhouse" order="10-">
Expand All @@ -253,6 +261,7 @@
</itemgra>
<itemgra item_types="poly_orchard" order="10-">
<polygon color="#041b10"/>
<polyline color="#03170d"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_plantnursery" order="10-">
Expand All @@ -269,12 +278,15 @@
</itemgra>
<itemgra item_types="poly_car_parking" order="8-">
<polygon color="#071b0d"/>
<polyline color="#061709"/>
</itemgra>
<itemgra item_types="poly_meadow" order="0-">
<polygon color="#051d11"/>
<polyline color="#031810"/>
</itemgra>
<itemgra item_types="poly_playground" order="10-">
<polygon color="#05190d"/>
<polygon color="#061d11"/>
<polyline color="#05190d"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_land" order="0-">
Expand All @@ -283,14 +295,17 @@
</itemgra>
<itemgra item_types="poly_flats,poly_scrub,poly_military_zone,poly_marine,plantation,tundra" order="0-">
<polygon color="#041a06"/>
<polyline color="#05170f"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_wood" order="0-">
<polygon color="#041a06"/>
<polygon color="#04170f"/>
<polyline color="#03130b"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_beach" order="0-">
<polygon color="#071d0d"/>
<polyline color="#061909"/>
<text color="#55c4bd" background_color="#000000" text_size="5"/>
</itemgra>
<itemgra item_types="poly_mud" order="0-">
Expand Down
25 changes: 19 additions & 6 deletions navit/navit_layout_car_shipped.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
</itemgra>
<itemgra item_types="poly_industry,poly_place" order="0-">
<polygon color="#dddddd"/>
<polyline color="#bbbbbb"/>
</itemgra>
<itemgra item_types="poly_naval_base" order="10-">
<polygon color="#6a9993"/>
Expand Down Expand Up @@ -134,15 +135,17 @@
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_camp_site" order="10-">
<polygon color="#7dc552"/>
<polygon color="#77dd77"/>
<polyline color="#55bb55"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_caravan_site" order="10-">
<polygon color="#88dd66"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_golf_course" order="10-">
<polygon color="#66cc66"/>
<polygon color="#66dd88"/>
<polyline color="#44bb66"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_marsh" order="10-">
Expand All @@ -162,11 +165,13 @@
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_park" order="0-">
<polygon color="#77cc55"/>
<polygon color="#99dd77"/>
<polyline color="#77bb55"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_heath" order="10-">
<polygon color="#d6d99f"/>
<polyline color="#bbbb77"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_scree" order="10-">
Expand Down Expand Up @@ -199,6 +204,7 @@
</itemgra>
<itemgra item_types="poly_sport" order="10-">
<polygon color="#a5dc72"/>
<polyline color="#88bb55"/>
</itemgra>
<itemgra item_types="poly_fishing" order="10-">
<polygon color="#713907"/>
Expand All @@ -217,7 +223,8 @@
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_picnic_site" order="10-">
<polygon color="#797548"/>
<polygon color="#dddd99"/>
<polyline color="#bbbb77"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_greenhouse" order="10-">
Expand All @@ -226,6 +233,7 @@
</itemgra>
<itemgra item_types="poly_orchard" order="10-">
<polygon color="#9edc90"/>
<polyline color="#77bb77"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_plantnursery" order="10-">
Expand All @@ -242,13 +250,15 @@
</itemgra>
<itemgra item_types="poly_car_parking" order="1-">
<polygon color="#eedd77"/>
<polyline color="#ccbb55"/>
</itemgra>
<itemgra item_types="poly_meadow" order="0-">
<polygon color="#bbee99"/>
<polyline color="#79c691"/>
</itemgra>
<itemgra item_types="poly_playground" order="10-">
<polygon color="#b4c479"/>
<polygon color="#ccee99"/>
<polyline color="#aacc77"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_water_tiled" order="0-">
Expand All @@ -261,14 +271,17 @@
</itemgra>
<itemgra item_types="poly_flats,poly_scrub,poly_marine,plantation,tundra" order="9-">
<polygon color="#c8d7ab" src="scrub.png" w="50" h="50"/>
<polyline color="#aabb88"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_wood" order="0-">
<polygon color="#8ec78d" src="wood.png" w="100" h="100"/>
<polygon color="#88bb88" src="wood.png" w="100" h="100"/>
<polyline color="#669966"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_beach" order="0-">
<polygon color="#eeee77"/>
<polyline color="#cccc55"/>
<text text_size="5"/>
</itemgra>
<itemgra item_types="poly_mud" order="0-">
Expand Down

0 comments on commit fbe143e

Please sign in to comment.