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

Accept custom color palettes in create_color_stops() #51

Closed
ryanbaumann opened this issue Feb 27, 2018 · 3 comments
Closed

Accept custom color palettes in create_color_stops() #51

ryanbaumann opened this issue Feb 27, 2018 · 3 comments

Comments

@ryanbaumann
Copy link
Contributor

Problem

Currently, the create_color_stops function accepts a string that defines a color palette from ColorBrewer. This function should also allow the user to pass a custom color palette as a list of color strings. The documentation claims this is possible today, but it is not yet implemented.

Solution

Make a PR to add support for passing a custom list of colors to create_color_stops -> https://github.com/mapbox/mapboxgl-jupyter/blob/master/mapboxgl/utils.py#L109

cc @pveugen

@ppessi
Copy link

ppessi commented Feb 27, 2018

Should it contain a check for if the list is valid?

ppessi pushed a commit to ppessi/mapboxgl-jupyter that referenced this issue Feb 27, 2018
ppessi pushed a commit to ppessi/mapboxgl-jupyter that referenced this issue Feb 27, 2018
@ppessi
Copy link

ppessi commented Feb 27, 2018

I don't know how to read, I thought that the reference by ryanbaumann was a reference from another issue and not a commit :D Oh well

@ryanbaumann
Copy link
Contributor Author

ryanbaumann commented Feb 27, 2018

I like your implementation, thanks for the PR @ppessi! We'll use your suggested color checking method in the existing PR, it's cleaner and doesn't require another library dependency -> 993b719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants