zschuessler / deltae Goto Github PK
View Code? Open in Web Editor NEWCIE color difference formulas in JavaScript
Home Page: http://zschuessler.github.io/DeltaE
License: The Unlicense
CIE color difference formulas in JavaScript
Home Page: http://zschuessler.github.io/DeltaE
License: The Unlicense
Why not just use rgb color space to calculate color difference?
Hello, I want to know where the table of the relationship between delta e and perception given in your document comes from? Is there any literature supporting the data in the table?
I've been playing around with your chroma-key script and all seems to work excellent. However, after about half a minute performance starts dropping in every browser I use. While your online example has no problem whatsoever. It remains fast. I tried stripping everything so only the essentials are left and tried to use your online source, however without success.
Do you have any idea what the problem might be? My video is just 320px < 0.5MB and has a very bright / good background without noice since it's rendered and not recorded.
Also, I am ashamed to ask, but where does the noise in the background of the video on your site come from? I am pretty new with Canvas, but just don't see where the black and red are created / attached. I am obviously looking for a canvas without background so the rendered video is lying on top of my site.
Thanks!
Hi
Reading http://zschuessler.github.io/DeltaE/learn/ it states that "Delta E value will range from 0 to 100". If I compare an orange and black using the following the code:
// Create two test LAB color objects to compare!
var color1 = {L: 100, A: 110, B: 110};
var color2 = {L: 0, A: 0, B: 0};
// 1976 formula
console.log(DeltaE.getDeltaE76(color1, color2));
// 1994 formula
console.log(DeltaE.getDeltaE94(color1, color2));
// 2000 formula
console.log(DeltaE.getDeltaE00(color1, color2));
I get the following results:
184.9324200890693
101.87291711716631
105.80638169501458
i.e. over 100 - is this a bug or is it valid to return values over 100?
I need to convert the value returned by DeltaE to a decimal so need to know what it's upper limit is (currently I artificially cap it at 100).
Thanks
Jon
Since all you are doing is thresholding the distance relative to several reference points, you can forgo the sqrt()
and just square the thresholds.
sqrt()
is a a very expensive function - avoiding it may significantly improve performance.
Alright, I just stumbled upon a very specific input that caused a mysterious crash.
const ΔE = require("delta-e");
const distance = ΔE.getDeltaE94(
{
L: 53.23288178584245,
A: 80.10930952982204,
B: 67.22006831026425
},
{
L: 50.9588099835815,
A: 77.47798295202801,
B: 65.01211079141827
}
);
console.log(distance); // NaN
This ends up returning a NaN
. I believe nothing’s special about those numbers? What makes it so special that it crashes my application?
This isn't exactly an issue or pull request, just a heads up that I've created a small fork that works well with ES Modules:.
This Delta E calculation is wrong. For some insight I suggest reading this paper.
Details:
de({l: 60, a: -79.86355100472929, b: 60.18150231520482}, {l: 60, a: 79.86355100472929, b: -60.181502315204824}) = 59.58968443596155;
de({l: 60, a: -79.86355100472929, b: 60.18150231520482}, {l: 60, a: 79.863656041144, b: -60.18136292692152}) = 102.06502930178404;
How can that be right when the difference in the second color is extremely small (and no difference in the first color) but the resulting Delta E is radically different?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.