Comments (3)
I'll look into it. I remember there was some special case, but it's been years since I touched that code, so I'll need to dive into it again to figure out how to handle it.
from one-color.
This seems to be a feature in the math that converts from HSL to HSV:
https://github.com/One-com/one-color/blob/master/lib/color/HSL.js#L15
The reason for it is probably that saturation is a useless dimension when lightness is zero. In that case the resulting color will be black, and the output color in the HSV space is also black. So the color is intact, but one of the dimensions simply doesn't make sense in that specific conversion and is hard reset to avoid division by zero.
I don't think there is a reasonable way to keep the information about saturation intact. Converting through rgb would yield the same result.
from one-color.
Thanks for looking into it. We managed to resolve the issue over at colorjoe
. In this particular case it was enough to move from HSL to HSV (used by rgb picker) as the results were equivalent (we were using HSV components for modifications after all).
I guess it's safe to close this. You could add a mention about the issue to README but apart from that I can't think of anything else to do.
from one-color.
Related Issues (20)
- Publish 2.3.2 to the jam repo HOT 3
- Implement color spaces: XYZ and CIE-L*ab HOT 9
- Eliminate color-namedColors.js in favor of DOM based solution? HOT 3
- In case jQuery exists, window.one.color is not set HOT 5
- New function doen't works for chrome apps HOT 4
- PhantomJS Support HOT 2
- Parsing CMYK percentages HOT 5
- Unnamed AMD module HOT 2
- Perceived Brightness HOT 5
- new Function() error in atom HOT 1
- Check that object is an instance of (any) Color HOT 1
- Output as 'hsv(...)' HOT 2
- About the source map files HOT 2
- Add new csswg color specification drafts to accepted syntaxes HOT 4
- Plans for P3 support? HOT 1
- Remove publishConfig from package.json HOT 3
- Validate is string a color HOT 1
- Module not found: Error: Can't resolve 'ONECOLOR' HOT 16
- LAB incorrectly converted HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from one-color.