-
Notifications
You must be signed in to change notification settings - Fork 804
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
Add ability to visualize UIColor, CIColor, and CGColorRef. #104
Add ability to visualize UIColor, CIColor, and CGColorRef. #104
Conversation
if isCFColor: | ||
return 1 | ||
else: | ||
return 0 |
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.
What's the reason for using 0
/1
instead of False
/True
?
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.
Copied the pattern from elsewhere in the script. Happy to change it.
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.
Cone to think of it, the != 0
is already returning a boolean. We can just return that.
Looks good, thank you! |
@kastiglione updated return statements |
…sualize-colors Add ability to visualize UIColor, CIColor, and CGColorRef.
@ZevEisenberg Thank you! If you have any other ideas, would love to get more pull requests or issues as well. |
Looks like this:
We could add more fancy visualization, including rendering text of what the constituent colors are, like Apple does, but I figured it would be a good idea to start simple.
Fixes #103