meta {
    title: "Color Ways";
    description: "Choose your preferred color and line width of building outlines for better visibility on different backgrounds. Also highways and waterways have clearer colors";
    version: "0.2.38_2025-08-14";
    author: "Martien, osm username martien-176 (formerly martien-vdg)";
    link: "https://josm.openstreetmap.de/wiki/Styles/ColorWays";
}

/* Setting Options */

setting::colordisplay {
  type: color;
  label: tr("Color used for displaying buildings");
  default: green;
}

setting::building_line_width {
  type: double;
  label: tr("Choose line width of building");
  default: 2;
}


/* Settings */

/* Buildings */

way[building] {
    color: setting("colordisplay");
}

way[building] {
    width: setting("building_line_width");
}


/* Highways */

way[highway=primary]
{
    width: 6;
}

way[highway=secondary]
{
    width: 4;
}

way[highway=tertiary]
{
    width: 4;
}

way[highway=unclassified]
{
    width: 4;
    color: white;
}

way[highway=track]
{
    width: 4;
    color: peru;
    dashes: 12,9;
    dashes-background-color: springgreen;
}

way[highway=service]
{
    width: 3;
    color: aqua;
}

way[highway=residential]
{
    width: 2;
    color: Aquamarine;
}

way[highway=path]
{
    width: 2;
    color: yellow;
}

/* Railways */

way[railway]
{
    width: 3;
    color: brown;
}

/* Waterways */

way[waterway=stream]
{
    width: 2;
    color: DeepSkyBlue;
}

way[waterway=river]
{
    width: 6;
}

/* Damaged buildings */

way[destroyed:building], way[damaged:building]
{
    width: 4;
    color: white;
    dashes: 12,9;
    dashes-background-color: red;

    text: eval("Damaged");
    text-color: white;
    text-halo-color: white;
    font-size: 15;
    text-position: center;
}

