-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Replace Trisurf color functions with colors.py
#570
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
Conversation
…ods and added custom scale value functionality
colors.py
@theengineear Finally! |
|
||
There are three basic types of color types: rgb, hex and tuple: | ||
|
||
rgb - An rgb color is a string of the form 'rgb(a,b,c)' where a, b and c are | ||
floats between 0 and 255 inclusive. | ||
integers between 0 and 255 inclusive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice attention to detail!
General comment, could you add more documentation about |
Sure! |
Can you point me to |
Sorry. i think I meant |
|
||
if isinstance(colors, str): | ||
if colors in PLOTLY_SCALES: | ||
return | ||
elif 'rgb' in colors or '#' in colors: | ||
colors_list = [colors] | ||
colors_list.append(colors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh man, this is super confusing to me... colors
sounds like an array. So what's going on with appending an array to an array? So colors_list ends up being a 2d array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I should be more clear...
The user inputs colors
as either a singleton color (i.e. 'rgb(x,y,z)', '#xxyyzz' or (x,y,z)) or an iterable (tuple, list) of these color types. I'm just ensuring here that if a singleton is given, that it's put inside a list so the script can iterate through the list and validate.
I'll add a :param description of colors
in the String Docs if that helps
…xamples in string docs (tools.py)
@theengineear When you get a chance. I hope things are more clear now. I added a #comment as well |
@theengineear Now? :) |
No description provided.