Comments (4)
@bsebastian86 thanks for that tip, and sorry for the delay.
I finally found a way to convert rgb to ryb so it looks like the demo page from from_hex method is working properly now.
from color-scheme-js.
Hi, seems this is a two year old issue that was unaddressed.
I noticed that this was giving the wrong results also, even on the demo page. Can you please tell me how to fix this? Thanks.
from color-scheme-js.
@bsebastian86 it looks like there's something being calculated incorrectly in rgb2hsv, however when I plug in different implementations, like this one: https://gist.github.com/mjackson/5311256, I still get an incorrect hue of 0 for the first color.
I checked Color::Scheme itself and it correctly returns 180 for the first color's hue. Its code for rgb2hsv hasn't changed in 11 years: https://github.com/rjbs/Color-Scheme/blob/master/lib/Color/Scheme.pm#L260
At this point I'm not sure where the issue lies... 😕
from color-scheme-js.
@c0bra i think it's because you are using the "h" value from HSV directly. The Hue here is based on the RGB color wheel, and not the RYB color wheel which the from_hue is based on.
This is actually my problem here. I need the formula to convert the Hue degree based on the RYB instead of the RGB. Can't find any resources on it, but Adobe's color and Paletton seem to have come up with it already... Programming is tough.
from color-scheme-js.
Related Issues (12)
- Light to dark or dark to light HOT 1
- ReferenceError: COLOR_WHEEL is not defined HOT 3
- Can't make the complement options work HOT 3
- distance has no effect HOT 2
- Excellent Implementation HOT 1
- Methods could return their current value when no arguments are supplied. HOT 2
- from RGB? HOT 3
- "TypeError: colorset1 is undefined" when using the from_hex() method HOT 1
- register at bower.io HOT 1
- TypeErrors for certain values of hue and dist HOT 1
- Register at cdnjs.cloudflare.com 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 color-scheme-js.