Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update highway colors to match openstreetmap-carto #2764

Closed
bhousel opened this issue Sep 1, 2015 · 10 comments
Closed

Update highway colors to match openstreetmap-carto #2764

bhousel opened this issue Sep 1, 2015 · 10 comments

Comments

@bhousel
Copy link
Member

bhousel commented Sep 1, 2015

RE: gravitystorm/openstreetmap-carto#1736
Discussion seems pretty much settled.

Although the goals of iD and openstreetmap-carto are different, I think we should update our highway styling to match what they are doing. Blue and green roads can be difficult to see on different backgrounds, and it would be weird for users of iD to see a drastically different road coloring than what is displayed on the main osm site.

That said, I think iD should retain some kind of color for highway=tertiary to make things less confusing for editing, so I'm planning to just pick something between the yellow highway=secondary and white highway=residential colors.

@ghost
Copy link

ghost commented Sep 2, 2015

+1

@Stalfur
Copy link
Contributor

Stalfur commented Sep 13, 2015

Thanks @bhousel - some sort of clearer marking of tertiary in iD will help.

@pnorman
Copy link
Contributor

pnorman commented Sep 13, 2015

You may want to use https://github.com/matkoniecz/openstreetmap-carto/blob/gsoc/scripts/generate_road_colours.py

It allows you to distribute a set of road colours across a range of hues by classification, and compute both fill colours and casing colours.

Even if you end up using different colours, being able to distribute them is very useful, and saves a lot of experimentation.

To customize it, you might want to change road_classes, line_colour_infos["fill"], and line_colour_infos["casing"]

@matkoniecz
Copy link
Contributor

Note, gravitystorm/openstreetmap-carto#1736 was merged and it will be included in the next release (nearest one, v.2.35 was released before this merge).

You may want to use https://github.com/matkoniecz/openstreetmap-carto/blob/gsoc/scripts/generate_road_colours.py

This script after merge resides at https://github.com/gravitystorm/openstreetmap-carto/blob/master/scripts/generate_road_colours.py

Even if you end up using different colours, being able to distribute them is very useful, and saves a lot of experimentation.

Yes, one of my biggest mistakes during developing road colours was not starting from writing this script.

@bhousel bhousel added the design label Sep 19, 2015
@bhousel
Copy link
Member Author

bhousel commented Sep 25, 2015

Even if you end up using different colours, being able to distribute them is very useful, and saves a lot of experimentation.

Yes, one of my biggest mistakes during developing road colours was not starting from writing this script.

@matkoniecz, @pnorman Can you elaborate? I'm not clear on what it means to "distribute" colors.

@matkoniecz
Copy link
Contributor

Instead of manually selecting colour for every road type (motorway, trunk, primary, secondary in current script configuration) using this script it is possible to set hue, chroma and lightness range.

In script

road_classes = ["motorway", "trunk", "primary", "secondary"]

sets list of roads over which colours will be distributed

and for example

min_h = 10
max_h = 106

sets hue range (each road always have the same hue, chroma and lightness is different for fill, casing etc)

For example to generate fill, with lightness ranging from 70 to 97 and chroma from 35 to 29:

line_colour_infos["fill"] = ColourInfo(start_l = 70, end_l = 97, start_c = 35, end_c = 29)

In that case motorway will be lch(70, 35, 10) and secondary lch(97,29,106), with trunk and primary in the middle. Script also converts from lch to rgb. In that case it outputs.

@motorway-fill: #e892a2; // Lch(70,35,10), error 0.5
@trunk-fill: #f9b29c; // Lch(79,33,42), error 0.7
@primary-fill: #fcd6a4; // Lch(88,31,74), error 1.7
@secondary-fill: #f7fabf; // Lch(97,29,106), error 1.7

So "try everything more saturated" means changing start_c and end_c values, rather than manually tweaking four separate colours trying to keep them equally separated without changing lightness and hue (what is nearly impossible to do in RGB space and taking a long time with manually tweaking lch and converting each new value separately).

I attempted to rewrite script to move setting data to top and it may be slightly more readable: https://github.com/matkoniecz/openstreetmap-carto/blob/clean/scripts/generate_road_colours.py (I am not happy about it and shield generation is still at the bottom with a special case of tertiary).

It seems that this script may be improved by properly separating setting wanted values and processing them. Also, probably some readme should be added at beginning.

@matkoniecz
Copy link
Contributor

https://github.com/matkoniecz/openstreetmap-carto/blob/clean/scripts/generate_road_colours.py now has separation of setting data and processing it what hopefully should make more clear what is happening.

@bhousel
Copy link
Member Author

bhousel commented Sep 28, 2015

@matkoniecz, @pnorman That sounds so complicated!

Because iD uses SVG for everything, I just adjust styles live in Chrome developer tools:

id live styles

@gravitystorm
Copy link

FYI, I've just tagged the release of openstreetmap-carto that contains these new colours, so I expect it to be rolled out on the OSMF servers at some point soon.

https://github.com/gravitystorm/openstreetmap-carto/releases/tag/v2.36.0 is the release version (2.36.0)
openstreetmap/chef#38 is the ticket for the OSMF server rollout.

@bhousel
Copy link
Member Author

bhousel commented Oct 30, 2015

FYI, I've just tagged the release of openstreetmap-carto that contains these new colours, so I expect it to be rolled out on the OSMF servers at some point soon.

Awesome! I'm finishing up styling our preset icons to match the new colors, and will tag an iD release within the next few days..

@bhousel bhousel closed this as completed in 68c6cfd Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants