-
Notifications
You must be signed in to change notification settings - Fork 6
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
Will there be support for other colorspaces? (munsell) #1
Comments
Ah I haven't pushed to this repo in a while. I'm mainly working in the branch in my phobos fork. I hadn't planned initial support for Munsell (is it useful to you?), but there will definitely be Lab. I'm working on API for doing high-level operations like blends and stuff at the moment, and thinking about array/batch processing API's. |
I was mainly suggesting munsell, because it is suggested by ggplot2 as a good way to get nice looking color palettes. Their documentation mentions: There might well be other colourspaces that are also suitable for this task (Lab?). Is the plan to add helpers for "linear" colour scales as well? About the phobos fork. Is it possible for me to use your more up to date work from dub? Or would that require using your whole phobos fork? Would be great if you could provide an up to date dub package. |
Lab is generally considered to have superseded Munsell in it's original intent (more perceptually uniform), but Munsell is still useful in some cases since it's a HSV style (polar) colourspace rather than a vector space. You're right, I'll add Munsell as a compliment to HSx, just as Lab is more of a compliment to RGB. It's useful.
If you want a polar colourspace with reasonable perceptual distribution (like Munsell), you can use HCY' in the meantime which I've already done and I'll push it in an hour or so. HCY' differs from Munsell in that Hue is not perceptually uniform like Munsell, but if you're not lerping the Hue (which it sounds like you're saying; Hue is constant, you're lerping the other channels?), then HCY's Chroma and Luma should be quite similar to Munsell, and those 2 channels lerp and blend well perceptually.
Linear RGB colourspaces are already supported. Other colourspaces are always linear.
I'll update this repo tonight with my latest work, but I think the only new feature I've done that'll be interesting to you is the HCY' colourspace, and improved colourspace conversion. |
It sounds like HCY' should fit my use case reasonably well, so if that is supported (and its conversion to RGB) then that would fit my needs. (I just noticed that ggplot itself actually uses Lab internally http://docs.ggplot2.org/0.9.3.1/scale_gradient.html) |
On a side note, I'm surprised a plot library really cares particularly about colourspaces... why is it so important? |
Mainly because you want to easily map values to nice looking colours. This mostly comes up when you want to map 3D to 2D. Colours can then be used to represent the 3rd dimension (height). Choosing the correct colourspace makes it easy to define a linear (natural looking) path from one color to another. The value (height) represents how far along that path you are. |
kk, pushed some updates. Have a go at that. |
More a question than an issue, but I was wondering if you are likely to add support for munsell (and Lab) colourspaces or if that is out of the scope of the library?
The text was updated successfully, but these errors were encountered: