-
Notifications
You must be signed in to change notification settings - Fork 31
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
Color handling #104
Comments
In the current Estelí implementation the two things are addressed the following:
|
You're completely right 👍 Looks like ugly the left side 🤢😅
I think I found a good approach, see this blog post. |
This looks convincing. Let's try it. |
transitfeed lib already have some useful functions we should investigate: |
I've checked it and they use the W3C formula to calculate the perceived brightness, but as stated on the blog post I've already posted above:
|
Implemented the suggestion by @ialokim in the |
I'm pretty happy with the current implementation, now. And I would suggest to move them to core but to two different places:
|
🎉
Why not having them both inside the |
Because there is only one function, for the other purpose we use the python extension
Is included now (see changes in the |
Created a PR for this: #114 |
Done. |
Transit lines in GTFS have a
route_color
and aroute_text_color
, whereas the text color "should provide sufficient contrast when viewed on a black and white screen".osm2gtfs tries to get this information from OpenStreetMap's
colour
tag. This can be information in RB hex code or a W3C color name.In a first step, in #99, it is introduced to map the information from
colour
to theLine
object to be used in the creators. The standard creator assume RGB hex colors, as also desired by GTFS. However for Estelí two good and additional functionalities are used, that could be considered to be moved also into the core of osm2gtfs:route_text_color
based onroute_color
.The text was updated successfully, but these errors were encountered: