#Colors: just-noticeable difference
▻http://connorgr.github.io/d3-jnd
The just-noticeable difference functions in this library can be used to determine whether two colors are too similar to be easily differentiated. This is often critical for visualization color design because information legibility directly affects usability.
The two functions in d3-jnd are:
d3.noticeablyDifferent(…)
, which returns true or false based on whether the two colors are noticeably different (i.e., ≥1 JND distant).
d3.jndLabInterval(…)
, which returns the minimum JND intervals for CIELAB L*, a*, and b* color channels. Each interval can be thought of as “1 JND” unit for that channel, and it is often sufficient to only have one channel that is ≥1 JND to maintain legibility.
▻http://bl.ocks.org/connorgr/84aaa3a86b7c1231be5221d26591a906