-
Notifications
You must be signed in to change notification settings - Fork 4
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
Apply lightness, saturation etc. to functions #5
Comments
Hi David, and thanks for the suggestion. I think the functions returned from
(using your Is there a good reason to prefer the two-step higher-order approach? The practical benefit of this isn't obvious to me, so a usage example would be very helpful. |
A good use case would be tinkering with plots. For example, if you use I often work from the command line, adding bits to my plot commands. It would be nice to just do
rather than having to hunt down the specific colours and use |
Thanks – I see the need. I'll look into getting this running when I have a bit of time. |
PR #7 is now merged, but I will keep this issue open until a full solution is committed. |
Drop me a line when it’s up on CRAN, and I’ll blog about it. The package really fills a gap. |
OK, the package is now updated so that all the property functions, including I think this should handle your requirements, but if you'd be willing to give it a quick test that would be very helpful. |
Will do. Sounds awesome!
David
…On Mon, 19 Nov 2018 at 12:01, Jon Clayden ***@***.***> wrote:
OK, the package is now updated so that all the property functions,
including opacity, plus complement, addmix and submix, should accept
palette functions or scales as their first arguments. As a bonus,
gradient() will now return a function if its second argument is missing
or NULL, which can then be manipulated further with the other functions.
I think this should handle your requirements, but if you'd be willing to
give it a quick test that would be very helpful.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFjJ9-xWw6bzEijxh7AwUl4zKjIkBlnvks5uwp2pgaJpZM4X9dqw>
.
|
This seems to work great. I'll tell you if anything comes up. |
Great! It's ready for CRAN so I'll get it sent off. If you run into any issues I can always do a point release. |
The update is now released as version 1.3.0, and I've added an example of darkening existing colours (as above) to the README. |
Great package.
It would be nice to be able to write e.g.
In other words to allow calling
lightness
,saturation
and friends on functions.One way to do this is as follows:
I've got a proof of concept if you think this is a cute idea.
An obvious extension is to e.g. ggplot colour scales.
The text was updated successfully, but these errors were encountered: