-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Clean up PLOTLY_SCALES
constant
#3185
Comments
This might not be the appropriate place to comment, feel free to ignore or remove this if so! From the perspective of reusing existing patterns, it would be great if there was a "get colorscale by name" function which can be used with all the existing colorscales, builtin to the javascript package or from one of the colors namespaces. I assume that the functionality exists somewhere, since it's possible to pass just a name when creating a plot, but I couldn't find it... |
Yeah that would be a much cleaner way forward. Unfortunately we've been exporting this one static object for a long time so there's probably a lot of downstream code that uses it. The way we can assign in a figure any colorscale by name, case-insensitively and with the We can probably populate In the meantime, once I've merged your excellent #3136 PR, I was planning on modifying your function to accept any of the values that the |
Soo, I implemented a "name, possibly capitalized, possibly reversed" to "actual colors" function. Should I create a new PR for it or just add it to #3136 ? |
Let's make a new function in a new PR I think so I can take a look. |
(and thanks!) |
PR: #3186 |
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson |
Right now we declare this in
colors
andtools
(not DRY!) and this is a case-sensitive list that doesn't include all the new scales that are accepted by the validators. This list is reimported in a few places downstream within our own library.Note also: the docstring of
ColorscaleValidator
hardcodes an incomplete list of the keys of this list 🤯I came across this while trying to use
"viridis"
as a scale name with a newly-added function that reused the patterns incolors
: #3136The text was updated successfully, but these errors were encountered: