-
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
Color out of range #5
Comments
Detecting out of range colors is mission critical feature for this plugin. You can easily disable it, just remove this three lines: Lines 28 to 30 in 016ab1e
HCL (CIELCH) and LAB are used when you want to get predictable perception, not predictable domain. So with HCL/LAB you easily get out-of-domain colors. E.g. you cannot ask for 'dark chromatic green', hcl(145, 60, 10) or 'bright chromatic blue', hcl(250, 60, 80). They are out of domain because there's no such colors. To get predictable domain (360°, 100, 100) of nice cylinder with unpredictable perception and awful ΔE distribution one can use HSL or HSV. Compare HSL and LAB domains to get the idea: http://bl.ocks.org/devgru/4c6c73b278a0dba364f8 IMHO there's more sense in improving HCL picker (http://devgru.github.io/hcl-picker/) so it will help you choose proper HCL gradient. Also, there are better tools for selecting specific HCL gradients. I'm looking forward to port it into this PostCSS plugin. |
Wow, thanks for detailed answer! Then maybe add an option that allow you to use this plugin in unsafe mode? When I tried to understand HCL spec – I found your hcl-picker, but I didn't get how to use it =) There is only rgb values on the right and no values for hcl |
Maybe we should do same thing as done here – display closest possible color in rgb? http://bl.ocks.org/mbostock/3e115519a1b495e0bd95
The text was updated successfully, but these errors were encountered: