-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Feature Request: Get HSV hue, saturation, value from color #1143
Comments
It looks like some code we've got for colour functions came from the same place. In my branch I've added support for |
@jmarquis send this to your designer: http://en.wikipedia.org/wiki/HSL_and_HSV#Disadvantages :) |
@ricardobeat, they may have technical downsides, but both HSL and HSV are very practical in a way that the Lab space is not - you don't look a an image and think 'it needs a bit more b'. Lab has exactly the same shortcomings as rgb in that respect - changing hue or saturation will most likely require unintuitive changes in all three channels. |
The deal is that HSL/HSV look intuitive but they aren't, the models are not RGB is pretty easy to work with - increase all three components for Anyway, this is not the place for this, sorry I started it. We can continue 2013/1/23 Marcus Bointon notifications@github.com
|
I agree with you @ricardobeat, HSL is better (I've done my research before), but the problem is that Photoshop only has HSV/HSB, and Photoshop is the industry standard. So when a designer tells me "oh this color is always the base color +10% brightness," the fact that HSL makes more sense does nothing to help me. The best solution would be for Photoshop to adopt HSL, but alas :/ Thanks @Synchro for the quick work! I assume this might end up in 1.4...? Not sure how things work here. |
Yes, it should be in 1.4. |
for brightness/lightness/luma/value (whatever you want to call it :), i've been getting great results with the HSP color model. http://alienryderflex.com/hsp.html though not standard, it's visually better than all the standard ones. if the sqrt is too computationally expensive, you can just fallback to plain weighted rgb values...either way the weights are still used. i found luma rec 709 values to be better than 601 personally on my sRGB displays. i use them for luminance calcs in my pXY.js canvas pixel analysis lib. https://github.com/leeoniya/pXY.js/blob/master/src/pXY.js#L214 |
The luma color property and less function (which I just improved this morning) uses the rec 709 coefficients, mainly because that's what the W3C recommends. |
I love the HSL color model and the functions for getting hue, saturation and lightness from a given color. Unfortunately, Photoshop only uses HSV (or HSB, as Adobe calls it). Converting to HSL is a pain when working with many PSDs from multiple designers. The hsv function in LESS is a fantastic help, but there's no reverse functions to help me adjust colors for gradients, etc. in my mixins.
Something like:
hsvhue(@color)
hsvsaturation(@color)
value(@color)
I found some JavaScript algorithms for converting the colors here:
http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c
Might this be possible? Thanks!
The text was updated successfully, but these errors were encountered: